X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/872b52bc24b5590ac8bdec7db882cdbefc0ec3ff..e3fd1dcb8b0b55525876440410f71791d8b4c2f3:/src/symlist.c diff --git a/src/symlist.c b/src/symlist.c index b3500d2d..874e238a 100644 --- a/src/symlist.c +++ b/src/symlist.c @@ -1,6 +1,7 @@ /* Lists of symbols for Bison - Copyright (C) 2002, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2007, 2009-2012 Free Software Foundation, + Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -122,7 +123,7 @@ symbol_list_syms_print (const symbol_list *l, FILE *f) symbol_print (l->content.sym, f); fprintf (stderr, l->action_props.is_value_used ? " used" : " unused"); if (l && l->content.sym) - fprintf (f, ", "); + fprintf (f, ", "); } } @@ -146,7 +147,13 @@ symbol_list_prepend (symbol_list *list, symbol_list *node) void symbol_list_free (symbol_list *list) { - LIST_FREE (symbol_list, list); + symbol_list *node, *next; + for (node = list; node; node = next) + { + next = node->next; + named_ref_free (node->named_ref); + free (node); + } } @@ -183,7 +190,7 @@ symbol_list_n_get (symbol_list *l, int n) l = l->next; if (l == NULL || (l->content_type == SYMLIST_SYMBOL && l->content.sym == NULL)) - return NULL; + return NULL; } return l;