From: Howard Chu Date: Thu, 27 Apr 2006 00:19:32 +0000 (+0000) Subject: Tweak mutexes X-Git-Tag: OPENLDAP_REL_ENG_2_4_1ALPHA~2^2~138 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6af977099696c9823d1dc872d49969939756c3e5;p=openldap Tweak mutexes --- diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index f134ed1d1f..008fe66ec7 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -837,7 +837,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) { int i; int logop; slap_verbmasks *lo; - Entry *e, *old = NULL; + Entry *e = NULL, *old = NULL; char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE+8]; struct berval bv; char *ptr; @@ -1124,11 +1124,12 @@ static int accesslog_response(Operation *op, SlapReply *rs) { } op2.o_bd->be_add( &op2, &rs2 ); - entry_free( e ); done: + if ( lo->mask & LOG_OP_WRITES ) + ldap_pvt_thread_mutex_unlock( &li->li_log_mutex ); + if ( e ) entry_free( e ); if ( old ) entry_free( old ); - ldap_pvt_thread_mutex_unlock( &li->li_log_mutex ); return SLAP_CB_CONTINUE; }