diff --git a/src/core.c b/src/core.c index 544e5934..27c226b0 100644 --- a/src/core.c +++ b/src/core.c @@ -14682,6 +14682,8 @@ __cold int mdbx_env_openW(MDBX_env *env, const wchar_t *pathname, if (!(flags & (MDBX_RDONLY | MDBX_SAFE_NOSYNC | MDBX_DEPRECATED_MAPASYNC))) { rc = osal_openfile(MDBX_OPEN_DXB_DSYNC, env, env_pathname.dxb, &env->me_dsync_fd, 0); + if (MDBX_IS_ERROR(rc)) + goto bailout; if (env->me_dsync_fd != INVALID_HANDLE_VALUE) { if ((flags & MDBX_NOMETASYNC) == 0) env->me_fd4meta = env->me_dsync_fd;