From: Ondřej Kuzník Date: Tue, 16 Mar 2021 10:00:22 +0000 (+0000) Subject: ITS#9051 Do not remove callback on intermediate responses X-Git-Tag: OPENLDAP_REL_ENG_2_5_3BETA~3^2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=152c12d4d3327752e72ebd5fc62304eff729917d;p=thirdparty%2Fopenldap.git ITS#9051 Do not remove callback on intermediate responses --- diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index 2ef09ab5db..128f8193c2 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -1492,7 +1492,9 @@ static int accesslog_response(Operation *op, SlapReply *rs) { Operation op2 = {0}; SlapReply rs2 = {REP_RESULT}; - { + /* ITS#9051 Make sure we only remove the callback on a final response */ + if ( rs->sr_type == REP_RESULT || rs->sr_type == REP_EXTENDED || + rs->sr_type == REP_SASL ) { slap_callback *sc = op->o_callback; op->o_callback = sc->sc_next; op->o_tmpfree(sc, op->o_tmpmemctx );