ITS#10342 lmdb: fix potential memleak in child txn_begin

This commit is contained in:
jinyaoguo 2025-05-27 21:47:48 -04:00 committed by Howard Chu
parent ac89f42433
commit ce339e82bd

View file

@ -2974,8 +2974,10 @@ renew:
rc = mdb_txn_renew0(txn);
}
if (rc) {
if (txn != env->me_txn0)
if (txn != env->me_txn0) {
free(txn->mt_u.dirty_list);
free(txn);
}
} else {
txn->mt_flags |= flags; /* could not change txn=me_txn0 earlier */
*ret = txn;