Opened 18 years ago

Closed 18 years ago

#3581 closed patch (fixed)

Fix 5 potential memory leaks

Reported by: Russell Bryant <russell@…> 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)

pthread_attr_destroy.13589.txt (2.4 KB) - added by Russell Bryant <russell@…> 18 years ago.
pthread_attr_destroy-libmythui.13589.txt (1.0 KB) - added by Russell Bryant <russell@…> 18 years ago.

Download all attachments as: .zip

Change History (4)

Changed 18 years ago by Russell Bryant <russell@…>

Changed 18 years ago by Russell Bryant <russell@…>

comment:1 Changed 18 years ago by Russell Bryant <russell@…>

The secon patch fixes 3 more places that had the same problem.

comment:2 Changed 18 years ago by cpinkham

Resolution: fixed
Status: newclosed

(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.

Note: See TracTickets for help on using tickets.