Opened 18 years ago
Closed 18 years ago
#3581 closed patch (fixed)
Fix 5 potential memory leaks
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | unknown |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
This patch fixes 5 places throughout the code where pthread_attr_init() was called, but not pthread_attr_destroy().
Attachments (2)
Change History (4)
Changed 18 years ago by
Attachment: | pthread_attr_destroy.13589.txt added |
---|
Changed 18 years ago by
Attachment: | pthread_attr_destroy-libmythui.13589.txt added |
---|
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [13608]) Call pthread_attr_destroy() after we're done with the pthread_attr_t data that was created when we called pthread_attr_init(). Fixes up some memory leaks in a few places, most noticable in the backend where we create a new thread whenever you delete a recording file.
I also removed the unnecessary attr used to set PTHREAD_CREATE_JOINABLE in NetworkControl?, since the default is joinable, we don't need to explicitly set this attribute.
Closes #3581 using slightly modified patch by Russell Bryant.
The secon patch fixes 3 more places that had the same problem.