[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mythtv-commits
Subject:    [mythtv-commits] Ticket #3381: Fix memory leak and other minor
From:       "MythTV" <mythtv () cvs ! mythtv ! org>
Date:       2007-04-30 5:01:00
Message-ID: 043.9e3c790127cf29dbc7f872cbcb8b3e57 () cvs ! mythtv ! org
[Download RAW message or body]

#3381: Fix memory leak and other minor pthread usage issues in FIFOWriter
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |       Owner:  ijr    
     Type:  patch      |      Status:  new    
 Priority:  minor      |   Milestone:  unknown
Component:  mythtv     |     Version:  head   
 Severity:  medium     |  
-----------------------+----------------------------------------------------
 This patch addresses a few issues that I noticed while browsing through
 libs/libmythtv/fifowriter.cpp:

  * The array of locks, fifo_lock, was not deleted in the FIFOWriter
 destructor.
  * pthread_mutex_init() was not called on the array of locks in the
 FIFOWriter constructor.  This is usually not that big of a deal on Linux
 because the default initial value of pthread_mutex_t is zeroed out.
 However, it can lead to weird problems on other platforms.
  * pthread_mutex_destroy() and pthread_cond_destroy() were not called on
 the two arrays of thread conditions and the one array of locks in the
 FIFOWriter destructor.  This can potentially create memory leaks.
  * There are two places where the empty_cond condition is signaled without
 locking the appropriate mutex.

 IRC: russellb

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3381>
MythTV <http://svn.mythtv.org/trac>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic