mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-01 23:54:12 +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))
|
||||
return MDBX_EBADSIGN;
|
||||
|
||||
if (!dont_sync && env->me_lck)
|
||||
rc = mdbx_env_sync(env, 1);
|
||||
if (!dont_sync && !(env->me_flags & MDBX_RDONLY))
|
||||
rc = mdbx_env_sync(env, true);
|
||||
|
||||
VALGRIND_DESTROY_MEMPOOL(env);
|
||||
while ((dp = env->me_dpages) != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user