Commit d74020eb authored by unknown's avatar unknown

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


sql/ha_berkeley.cc:
  Skip allocation of hash and lock on error
parent a3d3aef1
......@@ -165,11 +165,13 @@ bool berkeley_init(void)
{
db_env->close(db_env,0); /* purecov: inspected */
db_env=0; /* purecov: inspected */
goto err;
}
(void) hash_init(&bdb_open_tables,system_charset_info,32,0,0,
(hash_get_key) bdb_get_key,0,0);
pthread_mutex_init(&bdb_mutex,MY_MUTEX_INIT_FAST);
err:
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