]> git.sur5r.net Git - openldap/commitdiff
Plug memleaks
authorHoward Chu <hyc@openldap.org>
Thu, 6 Oct 2005 18:45:53 +0000 (18:45 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 6 Oct 2005 18:45:53 +0000 (18:45 +0000)
servers/slapd/overlays/syncprov.c

index 4316dd042d959d638a6864958ca9977a3b099426..f54d340057f78753a06b40126621733ed0fb3a7b 100644 (file)
@@ -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 );