From: Howard Chu Date: Tue, 18 Jan 2011 02:24:35 +0000 (+0000) Subject: ITS#6795 plug sr_ctrls memleak X-Git-Tag: MIGRATION_CVS2GIT~195 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4c1464f3cd612f9b95a0bc5dd36bdba30852d013;p=openldap ITS#6795 plug sr_ctrls memleak --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 14aed8cbd7..194fcf8679 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2330,6 +2330,7 @@ syncprov_search_response( Operation *op, SlapReply *rs ) rs->sr_ctrls = op->o_tmpalloc( sizeof(LDAPControl *)*2, op->o_tmpmemctx ); rs->sr_ctrls[1] = NULL; + rs->sr_flags |= REP_CTRLS_MUSTBEFREED; /* If we're in delta-sync mode, always send a cookie */ if ( si->si_nopres && si->si_usehint && a ) { struct berval cookie;