diff options
author | 2007-02-26 00:49:53 +0000 | |
---|---|---|
committer | 2007-02-26 00:49:53 +0000 | |
commit | ff19af11dd7add17cd983efdc3d0cf78e6b94340 (patch) | |
tree | 6d7edbfa497082b5a84505a7f8411eaa0bc6ff92 | |
parent | Revert a portion of rev 1.21, via-cuda behaves exactly opposite of via-pmu, (diff) | |
download | wireguard-openbsd-ff19af11dd7add17cd983efdc3d0cf78e6b94340.tar.xz wireguard-openbsd-ff19af11dd7add17cd983efdc3d0cf78e6b94340.zip |
don't leak memory, from dhclient; ok krw@
-rw-r--r-- | usr.sbin/dhcpd/parse.c | 6 |
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); } |