mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: fix NULL-deref bug (Coverity).
Change-Id: If48f1780d2887b6c2041effc6ca0f158eddb29c2
This commit is contained in:
parent
a6155bcf2a
commit
9168f8c69d
@ -12023,7 +12023,7 @@ int __cold mdbx_env_stat2(const MDBX_env *env, const MDBX_txn *txn,
|
||||
|
||||
const MDBX_db *db =
|
||||
txn ? &txn->mt_dbs[MAIN_DBI] : &mdbx_meta_head(env)->mm_dbs[MAIN_DBI];
|
||||
return mdbx_stat0(txn->mt_env, db, arg);
|
||||
return mdbx_stat0(txn ? txn->mt_env : env, db, arg);
|
||||
}
|
||||
|
||||
int __cold mdbx_env_info(MDBX_env *env, MDBX_envinfo *arg, size_t bytes) {
|
||||
|
Loading…
Reference in New Issue
Block a user