summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpyr <pyr@openbsd.org>2007-10-21 08:29:34 +0000
committerpyr <pyr@openbsd.org>2007-10-21 08:29:34 +0000
commitfc0bc67fd9afa7890ac4a1a4c64cdac9c1f567f3 (patch)
treecd90f2aa9275ede79e8d345df47f9dace90b181c
parentAllow for the adjustment of the number of RX descriptors (diff)
downloadwireguard-openbsd-fc0bc67fd9afa7890ac4a1a4c64cdac9c1f567f3.tar.xz
wireguard-openbsd-fc0bc67fd9afa7890ac4a1a4c64cdac9c1f567f3.zip
sync with other daemons.
ok mcbride@
-rw-r--r--usr.sbin/ifstated/parse.y8
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);
}