mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 15:49:34 -05:00
ITS#7292 plug memleaks in accesslog,syncprov
This commit is contained in:
parent
16c97dee9c
commit
4dba1f6963
2 changed files with 5 additions and 1 deletions
|
|
@ -1457,7 +1457,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||
Modifications *m;
|
||||
struct berval *b, uuid = BER_BVNULL;
|
||||
int i;
|
||||
int logop;
|
||||
int logop, do_graduate = 0;
|
||||
slap_verbmasks *lo;
|
||||
Entry *e = NULL, *old = NULL, *e_uuid = NULL;
|
||||
char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE+8];
|
||||
|
|
@ -1829,11 +1829,14 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||
|
||||
if (( lo->mask & LOG_OP_WRITES ) && !BER_BVISEMPTY( &op->o_csn )) {
|
||||
slap_queue_csn( &op2, &op->o_csn );
|
||||
do_graduate = 1;
|
||||
}
|
||||
|
||||
op2.o_bd->be_add( &op2, &rs2 );
|
||||
if ( e == op2.ora_e ) entry_free( e );
|
||||
e = NULL;
|
||||
if ( do_graduate )
|
||||
slap_graduate_commit_csn( &op2 );
|
||||
|
||||
done:
|
||||
if ( lo->mask & LOG_OP_WRITES )
|
||||
|
|
|
|||
|
|
@ -2353,6 +2353,7 @@ syncprov_search_response( Operation *op, SlapReply *rs )
|
|||
slap_compose_sync_cookie( op, &cookie, a->a_nvals, srs->sr_state.rid, slap_serverID ? slap_serverID : -1 );
|
||||
rs->sr_err = syncprov_state_ctrl( op, rs, rs->sr_entry,
|
||||
LDAP_SYNC_ADD, rs->sr_ctrls, 0, 1, &cookie );
|
||||
op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
|
||||
} else {
|
||||
rs->sr_err = syncprov_state_ctrl( op, rs, rs->sr_entry,
|
||||
LDAP_SYNC_ADD, rs->sr_ctrls, 0, 0, NULL );
|
||||
|
|
|
|||
Loading…
Reference in a new issue