summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-11-28 15:53:17 +0100
committerunknown <serg@serg.mylan>2004-11-28 15:53:17 +0100
commitb7c31a9e21feff876c57dacfec4ac42514e4823e (patch)
tree46d7ffed3e41aa68db463fe32568cb1f56dc23f2 /sql/sql_parse.cc
parent9bdc86738000c785e931654e99bb8ace2edc6334 (diff)
downloadmariadb-git-b7c31a9e21feff876c57dacfec4ac42514e4823e.tar.gz
protection: TRASH in delete
fixed a bug that it discovered include/my_sys.h: move TRASH to my_sys.h from sql_list.h sql/field.h: use TRASH macro sql/item.h: TRASH in delete sql/item_func.h: never delete item's manually! sql/opt_range.cc: TRASH in delete sql/sql_lex.h: TRASH in delete sql/sql_list.h: move TRASH to my_sys.h from sql_list.h sql/sql_parse.cc: don't use properties of deleted objects (even when it's safe) sql/sql_select.cc: TRASH in delete sql/sql_show.cc: TRASH in delete sql/sql_string.h: TRASH in delete
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 785d5a329ba..c04312f6ded 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1175,9 +1175,13 @@ end:
void free_items(Item *item)
{
+ Item *next;
DBUG_ENTER("free_items");
- for (; item ; item=item->next)
+ for (; item ; item=next)
+ {
+ next=item->next;
item->delete_self();
+ }
DBUG_VOID_RETURN;
}