summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-12-04 20:51:18 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-12-04 20:51:18 +0200
commit0481b233354f9f8d7dcc1e4b12ec91f51db864f6 (patch)
tree72b24958c1a6fd36adbabfb66ae897fa42a76d33
parent2c7f9fd68a33c1787039d60801714dd4959dd9fa (diff)
downloadmariadb-git-0481b233354f9f8d7dcc1e4b12ec91f51db864f6.tar.gz
A fix for double free'd pointer bug ...
BitKeeper/etc/ignore: Added innobase/stamp-h1 stamp-h1 to the ignore list
-rw-r--r--.bzrignore2
-rw-r--r--sql/sql_table.cc8
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 */