diff options
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -367,6 +367,8 @@ define2(const char *name, const char *val, struct inclist *file) name, (*sp)->s_value, val, file->i_file)); free((*sp)->s_value); (*sp)->s_value = strdup(val); + if ((*sp)->s_value == NULL) + fatalerr("strdup() failure in %s()\n", __func__); return; } @@ -383,6 +385,8 @@ define2(const char *name, const char *val, struct inclist *file) debug(1, ("defining %s to %s in file %s\n", name, val, file->i_file)); stab->s_name = strdup(name); stab->s_value = strdup(val); + if ((stab->s_name == NULL) || (stab->s_value == NULL)) + fatalerr("strdup() failure in %s()\n", __func__); *sp = stab; } |