diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-12-13 21:13:08 +0400 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-12-13 21:13:08 +0400 |
commit | e51e6097b98eb4faae8fec4704feab251d8031dc (patch) | |
tree | f47de2bb613a7274a33edfe3ff7fde262591d09b /sql | |
parent | f1d980542233ac18d3e4acc6911b8adfc432bb09 (diff) | |
download | mariadb-git-e51e6097b98eb4faae8fec4704feab251d8031dc.tar.gz |
valgrind error fix
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_blackhole.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index 93d085bbc88..f098ef71a43 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -296,13 +296,21 @@ static byte* blackhole_get_key(st_blackhole_share *share, uint *length, } +static void blackhole_free_key(st_blackhole_share *share) +{ + thr_lock_delete(&share->lock); + my_free((byte*) share, MYF(0)); +} + + bool blackhole_db_init() { DBUG_ENTER("blackhole_db_init"); if (pthread_mutex_init(&blackhole_mutex, MY_MUTEX_INIT_FAST)) goto error; if (hash_init(&blackhole_open_tables, &my_charset_bin, 32, 0, 0, - (hash_get_key) blackhole_get_key, 0, 0)) + (hash_get_key) blackhole_get_key, + (hash_free_key) blackhole_free_key, 0)) { VOID(pthread_mutex_destroy(&blackhole_mutex)); } |