diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-04-26 15:12:14 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-04-26 15:12:14 +0300 |
commit | 18a321adce6f07c62fae971bf022316cc649cfba (patch) | |
tree | 2b95575b4286f33a9be8c889def65f21ec7b0aea /sql/sql_select.cc | |
parent | 8078280c7664a385bccdf394f4927474ef738d98 (diff) | |
download | mariadb-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.cc | 28 |
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) |