X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d5e8574bf681b11db872279b1648bf6cc5095c9f..4b7a4c1b1c8c18e9ad2517c117442b9b7d7e671a:/src/symlist.c diff --git a/src/symlist.c b/src/symlist.c index b3500d2d..74cbe8b6 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, 2006, 2007, 2009 Free Software Foundation, + Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -146,7 +147,14 @@ 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; + if (node->named_ref) + named_ref_free (node->named_ref); + free (node); + } }