mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-21 18:58:21 +08:00
mdbx: fix memleak after midl2 rework.
Change-Id: I211a1c0e2b7e0c5abc44ff82151f83f81ddda754
This commit is contained in:
parent
ee21afce1e
commit
51b89c9690
@ -2735,8 +2735,10 @@ static int mdbx_page_touch(MDBX_cursor *mc) {
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
rc = mdbx_mid2l_insert(dl, pgno, np);
|
rc = mdbx_mid2l_insert(dl, pgno, np);
|
||||||
if (unlikely(rc))
|
if (unlikely(rc)) {
|
||||||
|
mdbx_dpage_free(txn->mt_env, np);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return MDBX_SUCCESS;
|
return MDBX_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -8015,6 +8017,7 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
|||||||
rc2 = mdbx_mid2l_insert(mc->mc_txn->mt_rw_dirtylist, pg, np);
|
rc2 = mdbx_mid2l_insert(mc->mc_txn->mt_rw_dirtylist, pg, np);
|
||||||
if (unlikely(rc2 != MDBX_SUCCESS)) {
|
if (unlikely(rc2 != MDBX_SUCCESS)) {
|
||||||
rc = rc2;
|
rc = rc2;
|
||||||
|
mdbx_dpage_free(env, np);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user