mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-28 17:47:33 -05:00
ITS#10302 slapd-mdb: fix idcursor double-free in slapadd shutdown
Caused when calling tool_entry_modify to update ctxcsn after all adds are done.
This commit is contained in:
parent
002214cc38
commit
429556c5f6
1 changed files with 2 additions and 1 deletions
|
|
@ -1051,7 +1051,7 @@ ID mdb_tool_entry_modify(
|
|||
op.o_tmpmfuncs = &ch_mfuncs;
|
||||
|
||||
/* id2entry index */
|
||||
rc = mdb_id2entry_update( &op, mdb_tool_txn, NULL, e );
|
||||
rc = mdb_id2entry_update( &op, mdb_tool_txn, idcursor, e );
|
||||
if( rc != 0 ) {
|
||||
snprintf( text->bv_val, text->bv_len,
|
||||
"id2entry_update failed: err=%d", rc );
|
||||
|
|
@ -1086,6 +1086,7 @@ done:
|
|||
e->e_id = NOID;
|
||||
}
|
||||
mdb_tool_txn = NULL;
|
||||
idcursor = NULL;
|
||||
|
||||
return e->e_id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue