X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/914e713d0787d4db80e29b1aa0a26e0fd5c929fa..48578d6c12bf4909a3753edae483605bc4ecd82f:/src/uniqstr.c diff --git a/src/uniqstr.c b/src/uniqstr.c index 644477be..78b8a98d 100644 --- a/src/uniqstr.c +++ b/src/uniqstr.c @@ -1,6 +1,6 @@ /* Keep a unique copy of strings. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -47,7 +47,8 @@ uniqstr_new (char const *str) { /* First insertion in the hash. */ res = xstrdup (str); - hash_insert (uniqstrs_table, res); + if (!hash_insert (uniqstrs_table, res)) + xalloc_die (); } return res; }