From: Howard Chu Date: Thu, 6 Oct 2005 18:45:53 +0000 (+0000) Subject: Plug memleaks X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~315 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f14f6472e706c7cd826b180eca0ece71200e3235;p=openldap Plug memleaks --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 4316dd042d..f54d340057 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -749,6 +749,7 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry **e, int mod a_uuid.a_nvals = &opc->suuid; rs.sr_err = syncprov_state_ctrl( op, &rs, &e_uuid, mode, ctrls, 0, 1, &cookie ); + op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx ); rs.sr_ctrls = ctrls; op->o_bd->bd_info = (BackendInfo *)on->on_info; @@ -1810,11 +1811,13 @@ syncprov_search_response( Operation *op, SlapReply *rs ) rs->sr_err = syncprov_done_ctrl( op, rs, rs->sr_ctrls, 0, 1, &cookie, ss->ss_present ? LDAP_SYNC_REFRESH_PRESENTS : LDAP_SYNC_REFRESH_DELETES ); + op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx ); } else { /* It's RefreshAndPersist, transition to Persist phase */ syncprov_sendinfo( op, rs, ( ss->ss_present && rs->sr_nentries ) ? LDAP_TAG_SYNC_REFRESH_PRESENT : LDAP_TAG_SYNC_REFRESH_DELETE, &cookie, 1, NULL, 0 ); + op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx ); /* Detach this Op from frontend control */ ldap_pvt_thread_mutex_lock( &ss->ss_so->s_mutex );