From: Pierangelo Masarati Date: Fri, 16 Sep 2005 18:12:57 +0000 (+0000) Subject: address ITS#4023 X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~414 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8d49b01be9aa61f8913b754594a4e846308e809;p=openldap address ITS#4023 --- diff --git a/libraries/librewrite/session.c b/libraries/librewrite/session.c index ac9196cec8..bd0685167c 100644 --- a/libraries/librewrite/session.c +++ b/libraries/librewrite/session.c @@ -204,6 +204,13 @@ rewrite_session_var_set_f( session = rewrite_session_find( info, cookie ); if ( session == NULL ) { session = rewrite_session_init( info, cookie ); + if ( session == NULL ) { + return REWRITE_ERR; + } + +#ifdef USE_REWRITE_LDAP_PVT_THREADS + ldap_pvt_thread_mutex_lock( &session->ls_mutex ); +#endif /* USE_REWRITE_LDAP_PVT_THREADS */ } #ifdef USE_REWRITE_LDAP_PVT_THREADS