mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
Plug memleaks
This commit is contained in:
parent
0a41d1db7b
commit
f14f6472e7
@ -749,6 +749,7 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, Entry **e, int mod
|
|||||||
a_uuid.a_nvals = &opc->suuid;
|
a_uuid.a_nvals = &opc->suuid;
|
||||||
rs.sr_err = syncprov_state_ctrl( op, &rs, &e_uuid,
|
rs.sr_err = syncprov_state_ctrl( op, &rs, &e_uuid,
|
||||||
mode, ctrls, 0, 1, &cookie );
|
mode, ctrls, 0, 1, &cookie );
|
||||||
|
op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
|
||||||
|
|
||||||
rs.sr_ctrls = ctrls;
|
rs.sr_ctrls = ctrls;
|
||||||
op->o_bd->bd_info = (BackendInfo *)on->on_info;
|
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,
|
rs->sr_err = syncprov_done_ctrl( op, rs, rs->sr_ctrls,
|
||||||
0, 1, &cookie, ss->ss_present ? LDAP_SYNC_REFRESH_PRESENTS :
|
0, 1, &cookie, ss->ss_present ? LDAP_SYNC_REFRESH_PRESENTS :
|
||||||
LDAP_SYNC_REFRESH_DELETES );
|
LDAP_SYNC_REFRESH_DELETES );
|
||||||
|
op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
|
||||||
} else {
|
} else {
|
||||||
/* It's RefreshAndPersist, transition to Persist phase */
|
/* It's RefreshAndPersist, transition to Persist phase */
|
||||||
syncprov_sendinfo( op, rs, ( ss->ss_present && rs->sr_nentries ) ?
|
syncprov_sendinfo( op, rs, ( ss->ss_present && rs->sr_nentries ) ?
|
||||||
LDAP_TAG_SYNC_REFRESH_PRESENT : LDAP_TAG_SYNC_REFRESH_DELETE,
|
LDAP_TAG_SYNC_REFRESH_PRESENT : LDAP_TAG_SYNC_REFRESH_DELETE,
|
||||||
&cookie, 1, NULL, 0 );
|
&cookie, 1, NULL, 0 );
|
||||||
|
op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
|
||||||
|
|
||||||
/* Detach this Op from frontend control */
|
/* Detach this Op from frontend control */
|
||||||
ldap_pvt_thread_mutex_lock( &ss->ss_so->s_mutex );
|
ldap_pvt_thread_mutex_lock( &ss->ss_so->s_mutex );
|
||||||
|
Loading…
Reference in New Issue
Block a user