diff --git a/src/mustach-dhcpd-pools.c b/src/mustach-dhcpd-pools.c index 54a2009..90e09e5 100644 --- a/src/mustach-dhcpd-pools.c +++ b/src/mustach-dhcpd-pools.c @@ -276,6 +276,8 @@ static char *must_read_template(const char *filename) struct stat s; char *result; + if (filename == NULL) + error(EXIT_FAILURE, 0, "must_read_template: --mustach argument missing"); if ((f = open(filename, O_RDONLY)) < 0) { error(EXIT_FAILURE, errno, "must_read_template: open: %s", filename); }