diff options
author | Sinisa@sinisa.nasamreza.org <> | 2002-12-04 20:51:18 +0200 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2002-12-04 20:51:18 +0200 |
commit | d527bfbd5974261b42192e1a07e86177113c9229 (patch) | |
tree | 72b24958c1a6fd36adbabfb66ae897fa42a76d33 | |
parent | cb6d9e0c8816b82f9f37e62983f5cd07518c36b2 (diff) | |
download | mariadb-git-d527bfbd5974261b42192e1a07e86177113c9229.tar.gz |
A fix for double free'd pointer bug ...
-rw-r--r-- | .bzrignore | 2 | ||||
-rw-r--r-- | sql/sql_table.cc | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/.bzrignore b/.bzrignore index 4a707ae05df..5b35d1f6611 100644 --- a/.bzrignore +++ b/.bzrignore @@ -331,3 +331,5 @@ bdb/dist/autom4te.cache/traces.0 innobase/autom4te.cache/output.0 innobase/autom4te.cache/requests innobase/autom4te.cache/traces.0 +innobase/stamp-h1 +stamp-h1 diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 0a09b6232e8..ec866b927e6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1528,8 +1528,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, /* We changed a temporary table */ if (error) { + /* + * The following function call will also free a + * new_table pointer. + * Therefore, here new_table pointer is not free'd as it is + * free'd in close_temporary() which is called by by the + * close_temporary_table() function. + */ close_temporary_table(thd,new_db,tmp_name); - my_free((gptr) new_table,MYF(0)); goto err; } /* Close lock if this is a transactional table */ |