diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-10-21 08:29:35 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-10-21 08:29:35 +0000 |
commit | 7ce7fee8a7adac9df66438ce219665085f01f4c4 (patch) | |
tree | 8aeb6386173559b21c7e6a22b81f276bb4aba873 /usr.sbin/ifstated | |
parent | a32a3a310f9898d998690cd51326e536299f931a (diff) |
sync with other daemons.
ok mcbride@
Diffstat (limited to 'usr.sbin/ifstated')
-rw-r--r-- | usr.sbin/ifstated/parse.y | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y index 4f9b26bd4e9..345469c03ed 100644 --- a/usr.sbin/ifstated/parse.y +++ b/usr.sbin/ifstated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.22 2007/10/16 20:01:23 mpf Exp $ */ +/* $OpenBSD: parse.y,v 1.23 2007/10/21 08:29:34 pyr Exp $ */ /* * Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org> @@ -687,9 +687,12 @@ pushfile(const char *name, int secret) struct file *nfile; if ((nfile = calloc(1, sizeof(struct file))) == NULL || - (nfile->name = strdup(name)) == NULL) + (nfile->name = strdup(name)) == NULL) { + warn("malloc"); return (NULL); + } if ((nfile->stream = fopen(nfile->name, "r")) == NULL) { + warnx("%s", nfile->name); free(nfile->name); free(nfile); return (NULL); @@ -735,7 +738,6 @@ parse_config(char *filename, int opts) } if ((file = pushfile(filename, 0)) == NULL) { - warn("%s", filename); free(conf); return (NULL); } |