On 11/30/2010 04:47 PM, Eric Blake wrote: > Here's a simple program that demonstrates that libselinux's attempts to > cache data ends up being a memory leak instead. The problem is that > __thread variables have no destructor, so when a long-running program > that uses multiple pthreads, where each thread uses selinux functions > which stash malloc'd memory into a __thread cache, then the cache memory > is leaked when the threads exit. Eamon's patch[1] looks good to me; and a quick test with my sample program proves that it avoids the leak. [1] https://bugzilla.redhat.com/attachment.cgi?id=464338, found at https://bugzilla.redhat.com/show_bug.cgi?id=658571 -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature