]> git.sur5r.net Git - openldap/commitdiff
ITS#6795 plug sr_ctrls memleak
authorHoward Chu <hyc@openldap.org>
Tue, 18 Jan 2011 02:24:35 +0000 (02:24 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 18 Jan 2011 02:24:35 +0000 (02:24 +0000)
servers/slapd/overlays/syncprov.c

index 14aed8cbd7a6e0a209f53756b15262706eae1413..194fcf867951ae649d674fb69b15b430708c8820 100644 (file)
@@ -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;