Commit 4dba1f69 authored by Howard Chu's avatar Howard Chu
Browse files

ITS#7292 plug memleaks in accesslog,syncprov

parent 16c97dee
......@@ -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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment