1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Corrected fix for not freed memory when using corrupted tables

This commit is contained in:
monty@tik.mysql.fi
2002-03-05 17:38:16 +02:00
parent cde0896521
commit c1ab560c3d
4 changed files with 11 additions and 2 deletions

View File

@ -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);
}