From f8d49b01be9aa61f8913b754594a4e846308e809 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 16 Sep 2005 18:12:57 +0000 Subject: [PATCH] address ITS#4023 --- libraries/librewrite/session.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.5