]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virThreadPoolFree: Join worker threads
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Nov 2013 13:40:12 +0000 (14:40 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 4 Dec 2013 15:36:46 +0000 (16:36 +0100)
commit78839da0bb0b549caa8058cf65de8cc72e0ae195
treefdef9f8e4f5be089b25f0fbedeb4af80c1ad62e4
parent81fae6b95cfe72d0f5a987b6b5cd4bf86e32798c
virThreadPoolFree: Join worker threads

Even though currently we are freeing the pool of worker threads at the
daemon very end, nothing holds us back in joining the worker threads.
Moreover, we avoid leaks like this:

==26697== 1,680 bytes in 5 blocks are possibly lost in loss record 913 of 942
==26697==    at 0x4C2BDE4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==26697==    by 0x4011131: allocate_dtv (in /lib64/ld-2.16.so)
==26697==    by 0x401176D: _dl_allocate_tls (in /lib64/ld-2.16.so)
==26697==    by 0x8499602: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.16.so)
==26697==    by 0x52F53E9: virThreadCreate (virthreadpthread.c:188)
==26697==    by 0x52F5D4F: virThreadPoolNew (virthreadpool.c:221)
==26697==    by 0x53F30DB: virNetServerNew (virnetserver.c:377)
==26697==    by 0x11C6ED: main (libvirtd.c:1366)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virthreadpool.c