From 7cc8c2c22dc6a5999554e64b25f162b3673cd922 Mon Sep 17 00:00:00 2001 From: babak sarashki Date: Sun, 3 Nov 2019 14:48:29 -0800 Subject: [PATCH 13/20] openldap missing unlock in accesslog overlay From stx 1901: openldap-missing-unlock-in-accesslog-overlay.patch A mutex lock might not get unlocked when plausible In the preceding if-statement a mutex may get locked. This is unlocked on 'done' label, but not called when plausible. Based on the current code logic this seems to not be able to happen, but might when code gets changed at some point in time. This patch fixes the issue. The issue was found by Coverity scan http://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/11054/38577/ Author: Matus Honek Resolves: #1261003 --- servers/slapd/overlays/accesslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index 6162b57..f6d7fc1 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -1517,7 +1517,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) { /* ignore these internal reads */ if (( lo->mask & LOG_OP_READS ) && op->o_do_not_cache ) { - return SLAP_CB_CONTINUE; + goto done; } if ( li->li_success && rs->sr_err != LDAP_SUCCESS ) -- 2.17.1