diff options
author | serg@serg.mylan <> | 2004-06-27 01:32:52 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-06-27 01:32:52 +0200 |
commit | 08ac1d1bda78db915acdf5fa47dfc14c91c251f6 (patch) | |
tree | d7f1d121682d5a3d6da570f99e70d48ebb375d99 /sql/tztime.cc | |
parent | 3236093b8b6f720439a727614c56da3979eb88bc (diff) | |
download | mariadb-git-08ac1d1bda78db915acdf5fa47dfc14c91c251f6.tar.gz |
memory leak in tz code closed
(table opened in my_tz_init, was removed from thd->open_tables in
tz_load_from_db w/o being unlocked, so it was stayng in open_cache
forever preventing the latter from being free'd in table_cache_free)
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index f6a9c99ac7f..aab0d36b61e 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1498,7 +1498,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) { sql_print_error("Fatal error: Can't lock time zone table: %s", thd->net.last_error); - goto end_with_cleanup; + goto end_with_close; } @@ -1563,6 +1563,9 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) end_with_unlock: mysql_unlock_tables(thd, lock); + +end_with_close: + close_thread_tables(thd); thd->version--; /* Force close to free memory */ end_with_setting_default_tz: @@ -1584,7 +1587,6 @@ end_with_cleanup: if (return_val) my_tz_free(); end: - close_thread_tables(thd); delete thd; if (org_thd) org_thd->store_globals(); /* purecov: inspected */ |