Blame SOURCES/openldap-missing-unlock-in-accesslog-overlay.patch

adf540
A mutex lock might not get unlocked when plausible
adf540
adf540
In the preceding if-statement a mutex may get locked. This is unlocked on
adf540
'done' label, but not called when plausible. Based on the current code logic
adf540
this seems to not be able to happen, but might when code gets changed at 
adf540
some point in time. This patch fixes the issue.
adf540
adf540
The issue was found by Coverity scan 
adf540
http://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/11054/38577/
adf540
adf540
Author: Matus Honek <mhonek@redhat.com>
adf540
Resolves: #1261003
adf540
adf540
--- a/servers/slapd/overlays/accesslog.c
adf540
+++ b/servers/slapd/overlays/accesslog.c
adf540
@@ -1519,7 +1519,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
adf540
 
adf540
 	/* ignore these internal reads */
adf540
 	if (( lo->mask & LOG_OP_READS ) && op->o_do_not_cache ) {
adf540
-		return SLAP_CB_CONTINUE;
adf540
+		goto done;
adf540
 	}
adf540
 
adf540
 	if ( li->li_success && rs->sr_err != LDAP_SUCCESS )