summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.fi>2002-03-05 17:38:16 +0200
committerunknown <monty@tik.mysql.fi>2002-03-05 17:38:16 +0200
commit39cdb786fd7db97399fff788df7547f5be73b132 (patch)
tree4c30c14208ff66b6c3278246e096cfb9df057c36 /sql
parentbceab09f00a9c8e03e53eb1a023e9797eaf1ef60 (diff)
downloadmariadb-git-39cdb786fd7db97399fff788df7547f5be73b132.tar.gz
Corrected fix for not freed memory when using corrupted tables
Docs/manual.texi: Changelog configure.in: Version change sql/sql_base.cc: Correct fix for not freed memory when using corrupted tables sql/table.cc: Correct fix for not freed memory when using corrupted tables
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_base.cc1
-rw-r--r--sql/table.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 1c281163b5a..656758623bc 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -277,7 +277,6 @@ void intern_close_table(TABLE *table)
free_io_cache(table);
if (table->file)
VOID(closefrm(table)); // close file
- hash_free(&table->name_hash);
}
diff --git a/sql/table.cc b/sql/table.cc
index ce7d185a7a1..7510e6bcce8 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -573,6 +573,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
delete outparam->file;
outparam->file=0; // For easyer errorchecking
outparam->db_stat=0;
+ hash_free(&outparam->name_hash);
free_root(&outparam->mem_root,MYF(0));
my_free(outparam->table_name,MYF(MY_ALLOW_ZERO_PTR));
DBUG_RETURN (error);
@@ -600,6 +601,7 @@ int closefrm(register TABLE *table)
}
delete table->file;
table->file=0; /* For easyer errorchecking */
+ hash_free(&outparam->name_hash);
free_root(&table->mem_root,MYF(0));
DBUG_RETURN(error);
}