summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-04-26 14:12:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-04-26 14:12:20 +0000
commitf936e0f3e9cc3e8d0c5e093bb0ef9ae2483d60a0 (patch)
treee4f4fba1bac608324e64cd44d66aa2503949b90e /usr.sbin/vmd
parentd8d7c5e8de3ef6f6275cb2515b7088d50c1651d7 (diff)
Plug leak in error case of the common 'varset' implementations.
ok benno@
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r--usr.sbin/vmd/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/vmd/parse.y b/usr.sbin/vmd/parse.y
index 7655ba5c89b..91e5d379821 100644
--- a/usr.sbin/vmd/parse.y
+++ b/usr.sbin/vmd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.32 2018/01/03 05:39:56 ccardenas Exp $ */
+/* $OpenBSD: parse.y,v 1.33 2018/04/26 14:12:19 krw Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
@@ -159,6 +159,8 @@ varset : STRING '=' STRING {
if (isspace((unsigned char)*s)) {
yyerror("macro name cannot contain "
"whitespace");
+ free($1);
+ free($3);
YYERROR;
}
}