[mythtv-commits] Ticket #5004: remove string leak in VideoOutputDirectfb::GetRefreshRate()

MythTV mythtv at cvs.mythtv.org
Wed Mar 19 21:29:34 UTC 2008


#5004: remove string leak in VideoOutputDirectfb::GetRefreshRate()
---------------------------------------------+------------------------------
 Reporter:  Erik Hovland <erik at hovland.org>  |       Owner:  ijr    
     Type:  defect                           |      Status:  new    
 Priority:  minor                            |   Milestone:  unknown
Component:  mythtv                           |     Version:  head   
 Severity:  low                              |     Mlocked:  0      
---------------------------------------------+------------------------------
 When the env var {{{FRAMEBUFFER}}} can't be found in the environ list the
 member function then does a {{{strdup("/dev/fb0")}}}. This dynamically
 allocates a string that will have to be cleaned up later. This is never
 done, so this little bit of memory is leaked. Since getenv gives up a
 pointer from environ (that is a static, global list of strings) then it
 makes sense to just hand over a constant string at this point instead of a
 strdup of a constant string.

 This defect was introduced in changeset:3720 from a patch given to the
 mythtv-dev list (at least four years ago).

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5004>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list