From d2f75ebaa52c2b79f42da6474c795f3eeda63afc Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 8 Oct 2007 13:28:25 +0000 Subject: [PATCH] Plug leak --- servers/slapd/overlays/syncprov.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 1c27796c0e..95fa584ba4 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2208,6 +2208,8 @@ no_change: nochange = 1; if ( si->si_usehint && srs->sr_rhint == 0 ) { if ( ctxcsn ) ber_bvarray_free_x( ctxcsn, op->o_tmpmemctx ); + if ( sids ) + op->o_tmpfree( sids, op->o_tmpmemctx ); send_ldap_error( op, rs, LDAP_SYNC_REFRESH_REQUIRED, "sync cookie is stale" ); return rs->sr_err; } @@ -2218,6 +2220,8 @@ no_change: nochange = 1; LDAP_SUCCESS ) { if ( ctxcsn ) ber_bvarray_free_x( ctxcsn, op->o_tmpmemctx ); + if ( sids ) + op->o_tmpfree( sids, op->o_tmpmemctx ); send_ldap_result( op, rs ); return rs->sr_err; }