[mythtv-commits] Ticket #11660: Patch to initialize Initialize member variables in MythRenderOpenGL ctor - fixes Coverity 700926 and 700927

MythTV noreply at mythtv.org
Fri Jul 12 00:51:55 UTC 2013


#11660: Patch to initialize Initialize member variables in MythRenderOpenGL ctor -
fixes Coverity 700926 and 700927
-------------------------------------------------+-------------------------
 Reporter:  Gary Buhrmaster <gary.buhrmaster@…>  |          Owner:
     Type:  Patch - Bug Fix                      |         Status:  new
 Priority:  minor                                |      Milestone:  unknown
Component:  MythTV - User Interface Library      |        Version:  Master
 Severity:  medium                               |  Head
 Keywords:                                       |     Resolution:
                                                 |  Ticket locked:  0
-------------------------------------------------+-------------------------

Comment (by Gary Buhrmaster <gary.buhrmaster@…>):

 Replying to [comment:2 Gary Buhrmaster <gary.buhrmaster@…>]:
 > Replying to [comment:1 natanojl]:
 > > This introduces a small leak of m_lock unless
 MythRenderOpenGL::ResetVars() is removed from
 MythRenderOpenGL[12]::ResetVars(void).
 >
 > Good catch.  Thanks.  I had seen the "new" a month or so ago when I
 first reviewed a possible fix, and then completely forgot about it (and
 missed it) in this second pass.  I'll try to get a revised patch worked
 out when I have some time this weekend.  In case it takes me some time to
 get around to it, you should feel free to close this ticket (as
 "broken"/"wontfix") and I'll submit a new ticket with a new patch.

 Here is an additional patch (apply at the same time, or it can be applied
 first) that is a "minimal" fix that eliminates the use of the pointer and
 uses the initialization list (I can find no reason that was not done
 originally; I may have simply missed the history).  A quick look suggests
 that most of the member variables should move to the initialization list
 (and would be a better long term fix).  But that is a much bigger change,
 and then there is the longer term re-factor for all this code that would
 make it all moot anyway.

 github ref:
 https://github.com/garybuhrmaster/mythtv/commit/ff042bddaf85a25f0faa019d081f1dd8921ed68d
 github git-am ref:
 https://github.com/garybuhrmaster/mythtv/commit/ff042bddaf85a25f0faa019d081f1dd8921ed68d.patch

--
Ticket URL: <http://code.mythtv.org/trac/ticket/11660#comment:3>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list