summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-09-05 10:57:26 +0300
committerunknown <bell@sanja.is.com.ua>2004-09-05 10:57:26 +0300
commit1230daf8f281bbb1ca07364b9a8c18ea4aa02a4d (patch)
tree5779cb0fdda4c7f8f7c14b15ea61723ae67d93b4 /sql/sql_derived.cc
parent9a63c8e0e468d7a64dcb7e23f4e5c344eebf635b (diff)
downloadmariadb-git-1230daf8f281bbb1ca07364b9a8c18ea4aa02a4d.tar.gz
memory leak fixed
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 30b06e91082..05ad2094372 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -222,10 +222,12 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
table->next= thd->derived_tables;
thd->derived_tables= table;
}
+ }
+ else
+ free_tmp_table(thd, table);
exit:
- delete derived_result;
- lex->current_select= save_current_select;
- }
+ delete derived_result;
+ lex->current_select= save_current_select;
DBUG_RETURN(res);
}