mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone

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

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