mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 13:09:42 -05:00
ITS#6376 plug potential leak
This commit is contained in:
parent
d6fbe1c7ca
commit
fe911c5960
1 changed files with 9 additions and 1 deletions
|
|
@ -855,7 +855,15 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so,
|
|||
}
|
||||
/* In case someone else freed it already? */
|
||||
if ( rs.sr_ctrls ) {
|
||||
op->o_tmpfree( rs.sr_ctrls[0], op->o_tmpmemctx );
|
||||
int i;
|
||||
for ( i=0; rs.sr_ctrls[i]; i++ ) {
|
||||
if ( rs.sr_ctrls[i] == ctrls[0] ) {
|
||||
op->o_tmpfree( ctrls[0]->ldctl_value.bv_val, op->o_tmpmemctx );
|
||||
ctrls[0]->ldctl_value.bv_val = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
slap_free_ctrls( op, rs.sr_ctrls );
|
||||
rs.sr_ctrls = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue