summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-04-26 15:12:14 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2003-04-26 15:12:14 +0300
commit18a321adce6f07c62fae971bf022316cc649cfba (patch)
tree2b95575b4286f33a9be8c889def65f21ec7b0aea /sql/sql_select.cc
parent8078280c7664a385bccdf394f4927474ef738d98 (diff)
downloadmariadb-git-18a321adce6f07c62fae971bf022316cc649cfba.tar.gz
Making a better fix for double released pointers and safe
TMP_TABLE_PARAM. This involved moving things around in include files. All tests, including the ones with Valgrind passed.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc28
1 files changed, 8 insertions, 20 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index bf17497fa19..55567493a4a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1281,16 +1281,10 @@ JOIN::cleanup(THD *thd)
JOIN_TAB *tab, *end;
for (tab= join_tab, end= tab+tables ; tab != end ; tab++)
{
- if (tab->select)
- {
- delete tab->select;
- tab->select=0;
- }
- if (tab->quick)
- {
- delete tab->quick;
- tab->quick=0;
- }
+ delete tab->select;
+ delete tab->quick;
+ tab->select=0;
+ tab->quick=0;
x_free(tab->cache.buff);
tab->cache.buff= 0;
}
@@ -3292,16 +3286,10 @@ join_free(JOIN *join, bool full)
{
for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++)
{
- if (tab->select)
- {
- delete tab->select;
- tab->select=0;
- }
- if (tab->quick)
- {
- delete tab->quick;
- tab->quick=0;
- }
+ delete tab->select;
+ delete tab->quick;
+ tab->select=0;
+ tab->quick=0;
x_free(tab->cache.buff);
tab->cache.buff= 0;
if (tab->table)