mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-23 01:48:21 +08:00
mdbx: fix resource-leak in mdbx_env_open_ex() in case of error (coverity).
Change-Id: I9e808e2de4a64d05205a79c9d90feacc87ec930d
This commit is contained in:
parent
93d92db43d
commit
beda690227
@ -4924,7 +4924,7 @@ int __cold mdbx_env_open_ex(MDBX_env *env, const char *path, unsigned flags,
|
|||||||
rc = mdbx_rthc_alloc(&env->me_txkey, &env->me_lck->mti_readers[0],
|
rc = mdbx_rthc_alloc(&env->me_txkey, &env->me_lck->mti_readers[0],
|
||||||
&env->me_lck->mti_readers[env->me_maxreaders]);
|
&env->me_lck->mti_readers[env->me_maxreaders]);
|
||||||
if (unlikely(rc != MDBX_SUCCESS))
|
if (unlikely(rc != MDBX_SUCCESS))
|
||||||
return rc;
|
goto bailout;
|
||||||
env->me_flags |= MDBX_ENV_TXKEY;
|
env->me_flags |= MDBX_ENV_TXKEY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user