]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9051 Do not remove callback on intermediate responses
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 16 Mar 2021 10:00:22 +0000 (10:00 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 18 Mar 2021 16:36:56 +0000 (16:36 +0000)
servers/slapd/overlays/accesslog.c

index 2ef09ab5dbbe91135f9a68d89d1689182a0cf5e1..128f8193c29cb8b4da544c4ac261bcd522bcef55 100644 (file)
@@ -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 );