summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/dhcpd/parse.c')
-rw-r--r--usr.sbin/dhcpd/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/parse.c b/usr.sbin/dhcpd/parse.c
index 1121aac62da..13398243f10 100644
--- a/usr.sbin/dhcpd/parse.c
+++ b/usr.sbin/dhcpd/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.10 2006/11/22 21:35:56 stevesk Exp $ */
+/* $OpenBSD: parse.c,v 1.11 2007/02/26 00:49:53 stevesk Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -128,8 +128,10 @@ parse_string(FILE *cfile)
error("no memory for string %s.", val);
strlcpy(s, val, strlen(val) + 1);
- if (!parse_semi(cfile))
+ if (!parse_semi(cfile)) {
+ free(s);
return (NULL);
+ }
return (s);
}