summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2013-02-01 20:44:01 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2013-02-01 20:44:01 +0000
commita2dac98b7d878918569ccbbdb46e8315c60a543c (patch)
treea0e5af40dd8cb43ac71866d849babb11d6a9cca3 /sbin
parent5487721ba7e5bccb3a572a8469d28b5b007a680d (diff)
do not leak lease in error path; found by llvm
ok krw@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/clparse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index b0ef57f2607..b2c41a2c566 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.51 2013/01/02 01:06:57 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.52 2013/02/01 20:44:00 florian Exp $ */
/* Parser for dhclient config and lease files... */
@@ -435,6 +435,7 @@ parse_client_lease_statement(FILE *cfile, int is_static)
token = peek_token(NULL, cfile);
if (token == EOF) {
parse_warn("unterminated lease declaration.");
+ free(lease);
return;
}
if (token == '}')