]> git.sur5r.net Git - openldap/commitdiff
address ITS#4023
authorPierangelo Masarati <ando@openldap.org>
Fri, 16 Sep 2005 18:12:57 +0000 (18:12 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 16 Sep 2005 18:12:57 +0000 (18:12 +0000)
libraries/librewrite/session.c

index ac9196cec8ac40ceaedc88fbb2ad70bd3acf4797..bd0685167c926dab95868cd30e893df163a7e7d3 100644 (file)
@@ -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