mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
MDB_VL32 plug rpage leak
mdb_cursor_set wasn't unref'ing as intended.
This commit is contained in:
parent
77d522d151
commit
7e2290c52b
1 changed files with 6 additions and 3 deletions
|
|
@ -6620,8 +6620,10 @@ mdb_cursor_set(MDB_cursor *mc, MDB_val *key, MDB_val *data,
|
|||
if (key->mv_size == 0)
|
||||
return MDB_BAD_VALSIZE;
|
||||
|
||||
if (mc->mc_xcursor)
|
||||
if (mc->mc_xcursor) {
|
||||
MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0);
|
||||
mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF);
|
||||
}
|
||||
|
||||
/* See if we're already on the right page */
|
||||
if (mc->mc_flags & C_INITIALIZED) {
|
||||
|
|
@ -6753,8 +6755,6 @@ set1:
|
|||
return MDB_SUCCESS;
|
||||
}
|
||||
|
||||
if (mc->mc_xcursor)
|
||||
MDB_CURSOR_UNREF(&mc->mc_xcursor->mx_cursor, 0);
|
||||
if (F_ISSET(leaf->mn_flags, F_DUPDATA)) {
|
||||
mdb_xcursor_init1(mc, leaf);
|
||||
}
|
||||
|
|
@ -8303,6 +8303,9 @@ mdb_cursor_count(MDB_cursor *mc, mdb_size_t *countp)
|
|||
void
|
||||
mdb_cursor_close(MDB_cursor *mc)
|
||||
{
|
||||
if (mc) {
|
||||
MDB_CURSOR_UNREF(mc, 0);
|
||||
}
|
||||
if (mc && !mc->mc_backup) {
|
||||
/* remove from txn, if tracked */
|
||||
if ((mc->mc_flags & C_UNTRACK) && mc->mc_txn->mt_cursors) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue