From c78014bc5dc1d4dff7b81c8d8f9c02dfe54f0a4f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 7 Sep 2010 02:01:35 +0000 Subject: [PATCH] make sure callback is freed (ITS#6640) --- servers/slapd/overlays/pcache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 46ce69ce69..88b90c3a32 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -2389,8 +2389,7 @@ over:; entry_free(si->head); } } - op->o_callback = op->o_callback->sc_next; - op->o_tmpfree( cb, op->o_tmpmemctx ); + } else if ( si->caching_reason != PC_IGNORE ) { CachedQuery *qc = qm->addfunc(op, qm, &si->query, si->qtemp, si->caching_reason, 1 ); @@ -2446,6 +2445,9 @@ over:; } else { filter_free( si->query.filter ); } + + op->o_callback = op->o_callback->sc_next; + op->o_tmpfree( cb, op->o_tmpmemctx ); } return SLAP_CB_CONTINUE; -- 2.39.5