summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/lang.l
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/config/lang.l')
-rw-r--r--usr.sbin/config/lang.l3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l
index c7845cb..4eb94da 100644
--- a/usr.sbin/config/lang.l
+++ b/usr.sbin/config/lang.l
@@ -33,6 +33,7 @@
#include <assert.h>
#include <ctype.h>
+#include <err.h>
#include <string.h>
#include "y.tab.h"
#include "config.h"
@@ -220,6 +221,8 @@ cfgfile_add(const char *fname)
struct cfgfile *cf;
cf = calloc(1, sizeof(*cf));
+ if (cf == NULL)
+ err(EXIT_FAILURE, "calloc");
assert(cf != NULL);
asprintf(&cf->cfg_path, "%s", fname);
STAILQ_INSERT_TAIL(&cfgfiles, cf, cfg_next);
OpenPOWER on IntegriCloud