From db635c9fbbe28d0b8b32521bfe0b792aac9e4b40 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Wed, 6 May 2020 20:04:33 +0300 Subject: [PATCH] mdbx: fix/don't clean env-signature if open failed. --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 1b06aafe..40fb627f 100644 --- a/src/core.c +++ b/src/core.c @@ -10257,7 +10257,6 @@ static int __cold mdbx_env_close0(MDBX_env *env) { return MDBX_SUCCESS; } - env->me_signature = 0; env->me_flags &= ~MDBX_ENV_ACTIVE; env->me_oldest = nullptr; env->me_sync_timestamp = nullptr; @@ -10370,6 +10369,7 @@ int __cold mdbx_env_close_ex(MDBX_env *env, int dont_sync) { #endif } + env->me_signature = 0; rc = mdbx_env_close0(env) ? MDBX_PANIC : rc; mdbx_ensure(env, mdbx_fastmutex_destroy(&env->me_dbi_lock) == MDBX_SUCCESS); #if defined(_WIN32) || defined(_WIN64)