From: Jan Synacek Date: Wed, 13 Nov 2013 08:06:54 +0000 (+0100) Subject: ITS#7723 fix reference counting X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=59688044386dfeee0c837a15133f4e878f1bb661;p=openldap ITS#7723 fix reference counting --- diff --git a/libraries/librewrite/session.c b/libraries/librewrite/session.c index fcc76987e9..02fc0540b3 100644 --- a/libraries/librewrite/session.c +++ b/libraries/librewrite/session.c @@ -161,6 +161,7 @@ rewrite_session_find( #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 @@ rewrite_session_return( ) { assert( session != NULL ); + session->ls_count--; ldap_pvt_thread_mutex_unlock( &session->ls_mutex ); }