summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-06-27 01:32:52 +0200
committerunknown <serg@serg.mylan>2004-06-27 01:32:52 +0200
commit462bb8fe57ebd31a917d07372fa49fd1a2d7bc64 (patch)
treed7f1d121682d5a3d6da570f99e70d48ebb375d99 /sql/tztime.cc
parentfa70ff2ba696af1b5804f2aea833e2cca9c30979 (diff)
downloadmariadb-git-462bb8fe57ebd31a917d07372fa49fd1a2d7bc64.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.cc6
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 */