Permalink
Browse files

Moved check_all_databases_closed inside check for G_DB_ENV != NULL, o…

…therwise

fails on LOCK_DATABASE when G_DATABASES_MUTEX is uninitialized.
  • Loading branch information...
1 parent f14f426 commit 25a78e0b8e4685b2da3b978f2c77ac5234cbb8e6 Jon Meredith committed with toland Jun 29, 2009
Showing with 1 addition and 5 deletions.
  1. +1 −5 c_src/bdberl_drv.c
View
@@ -548,15 +548,11 @@ static void bdberl_drv_finish()
}
G_BDBERL_PIPE[0] = -1;
-
- // TODO: Add check to make sure all databases are *really* closed before
- // the environment is closed.
- check_all_databases_closed();
-
// Cleanup and shut down the BDB environment. Note that we assume
// all ports have been released and thuse all databases/txns/etc are also gone.
if (G_DB_ENV != NULL)
{
+ check_all_databases_closed();
G_DB_ENV->close(G_DB_ENV, 0);
G_DB_ENV = NULL;
}

0 comments on commit 25a78e0

Please sign in to comment.