Commit d527bfbd authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org
Browse files

A fix for double free'd pointer bug ...

parent cb6d9e0c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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
+7 −1
Original line number Diff line number Diff line
@@ -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 */