openldap/openldap-rwm-reference-counting.patch
2014-02-04 09:40:28 +01:00

27 lines
672 B
Diff

Author: Jan Synáček <jsynacek@redhat.com>
Resolves: #1060851
Upstream ITS: #7723
Correctly count references in rwm overlay.
--- a/libraries/librewrite/session.c 2010-04-13 22:23:09.000000000 +0200
+++ b/libraries/librewrite/session.c 2013-11-08 08:47:26.000000000 +0100
@@ -161,6 +161,7 @@
#ifdef USE_REWRITE_LDAP_PVT_THREADS
if ( session ) {
ldap_pvt_thread_mutex_lock( &session->ls_mutex );
+ session->ls_count++;
}
ldap_pvt_thread_rdwr_runlock( &info->li_cookies_mutex );
#endif /* USE_REWRITE_LDAP_PVT_THREADS */
@@ -178,6 +179,7 @@
)
{
assert( session != NULL );
+ session->ls_count--;
ldap_pvt_thread_mutex_unlock( &session->ls_mutex );
}