From 6af977099696c9823d1dc872d49969939756c3e5 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 27 Apr 2006 00:19:32 +0000 Subject: [PATCH] Tweak mutexes --- servers/slapd/overlays/accesslog.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.39.5