X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/affac6132ae6ee354e1497e456b5c81a0c84334f..47671055438197794c88a6f7fb90acbc19fe413b:/src/gram.c diff --git a/src/gram.c b/src/gram.c index d6857369..28666b0c 100644 --- a/src/gram.c +++ b/src/gram.c @@ -1,6 +1,6 @@ /* Allocate input grammar variables for Bison. - Copyright (C) 1984, 1986, 1989, 2001, 2002, 2003, 2005 Free + Copyright (C) 1984, 1986, 1989, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -325,7 +325,8 @@ grammar_rules_never_reduced_report (const char *message) void grammar_free (void) { - free (ritem); + if (ritem) + free (ritem - 1); free (rules); free (token_translations); /* Free the symbol table data structure. */