You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Yann Lavictoire <yl...@netsecureone.com> on 2005/03/11 17:27:36 UTC
[PATCH] apr-1.1.0/locks/win32/thread_cond.c
Hello,
'pool_cleanup_register(cond, thread_cond_cleanup)' call is missing in 'apr_thread_cond_create()' while
'apr_thread_cond_destroy()' calls 'pool_cleanup_run(cond)' (ie. HANDLEs leakage not only on "external" pool cleanup).
Sorry for my frenchy english.
Bye,
Yann.
The patch :
--- apr-1.1.0/locks/win32/thread_cond.old.c 2004-11-24 22:51:50.000000000 +0000
+++ apr-1.1.0/locks/win32/thread_cond.c 2005-03-11 16:02:53.000000000 +0000
@@ -38,6 +38,9 @@
(*cond)->mutex = CreateMutex(NULL, FALSE, NULL);
(*cond)->signal_all = 0;
(*cond)->num_waiting = 0;
+
+ apr_pool_cleanup_register((*cond)->pool, (*cond), thread_cond_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}