mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone
Blob Blame History Raw
Author: Jan Synáček <jsynacek@redhat.com>
Resolves: #1061405
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 );
 }