]> git.saurik.com Git - bison.git/blobdiff - src/uniqstr.c
Prepare for 2.4.2 release.
[bison.git] / src / uniqstr.c
index 644477bed20a89801e5782082c3ccbc245cd4712..c9efb5d1184ec51eb84763e2d8ad492cc4cd477a 100644 (file)
@@ -1,6 +1,6 @@
 /* Keep a unique copy of strings.
 
-   Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2005, 2009-2010 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;
 }