Commit 3d2481ba authored by jimw@mysql.com's avatar jimw@mysql.com

Fix small memory leak that occured when BerkeleyDB failed to initialize.

parent 8b33aad4
...@@ -165,11 +165,13 @@ bool berkeley_init(void) ...@@ -165,11 +165,13 @@ bool berkeley_init(void)
{ {
db_env->close(db_env,0); /* purecov: inspected */ db_env->close(db_env,0); /* purecov: inspected */
db_env=0; /* purecov: inspected */ db_env=0; /* purecov: inspected */
goto err;
} }
(void) hash_init(&bdb_open_tables,system_charset_info,32,0,0, (void) hash_init(&bdb_open_tables,system_charset_info,32,0,0,
(hash_get_key) bdb_get_key,0,0); (hash_get_key) bdb_get_key,0,0);
pthread_mutex_init(&bdb_mutex,MY_MUTEX_INIT_FAST); pthread_mutex_init(&bdb_mutex,MY_MUTEX_INIT_FAST);
err:
DBUG_RETURN(db_env == 0); DBUG_RETURN(db_env == 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment