mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:18:21 +08:00
mdbx: fix mdbx_env_close_ex() for MDBX_RDONLY.
Change-Id: I5ff79a93e026d4b40412294956dd222081a1b821
This commit is contained in:
parent
ab8fa36033
commit
94af9e02b0
@ -5123,8 +5123,8 @@ int __cold mdbx_env_close_ex(MDBX_env *env, int dont_sync) {
|
|||||||
if (unlikely(env->me_signature != MDBX_ME_SIGNATURE))
|
if (unlikely(env->me_signature != MDBX_ME_SIGNATURE))
|
||||||
return MDBX_EBADSIGN;
|
return MDBX_EBADSIGN;
|
||||||
|
|
||||||
if (!dont_sync && env->me_lck)
|
if (!dont_sync && !(env->me_flags & MDBX_RDONLY))
|
||||||
rc = mdbx_env_sync(env, 1);
|
rc = mdbx_env_sync(env, true);
|
||||||
|
|
||||||
VALGRIND_DESTROY_MEMPOOL(env);
|
VALGRIND_DESTROY_MEMPOOL(env);
|
||||||
while ((dp = env->me_dpages) != NULL) {
|
while ((dp = env->me_dpages) != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user