X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e3a33f7c23fc9febd1bbff33045c8b455a1972a8..4b7a4c1b1c8c18e9ad2517c117442b9b7d7e671a:/src/muscle_tab.c?ds=inline diff --git a/src/muscle_tab.c b/src/muscle_tab.c index cfddbcf3..c25b519d 100644 --- a/src/muscle_tab.c +++ b/src/muscle_tab.c @@ -120,7 +120,8 @@ muscle_insert (char const *key, char const *value) /* First insertion in the hash. */ entry = xmalloc (sizeof *entry); entry->key = key; - hash_insert (muscle_table, entry); + if (!hash_insert (muscle_table, entry)) + xalloc_die (); } else free (entry->storage); @@ -149,7 +150,8 @@ muscle_grow (const char *key, const char *val, const char *separator) /* First insertion in the hash. */ entry = xmalloc (sizeof *entry); entry->key = key; - hash_insert (muscle_table, entry); + if (!hash_insert (muscle_table, entry)) + xalloc_die (); entry->value = entry->storage = xstrdup (val); } else