summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index d1b67b6..5915a81 100644
--- a/parse.c
+++ b/parse.c
@@ -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;
}