summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2019-10-18 06:03:26 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2019-10-18 06:03:26 +0000
commitb45a609831b2b6685f893a3a819464a2a1fd9e3b (patch)
treedc656544bd9110c7a00019f4571473ddf99b2d08 /sbin
parent5dc79f98713180c98d3451614b6a8f770a033ad8 (diff)
Plug mem leak in error path; ok florian@ who also spotted the rad case
Diffstat (limited to 'sbin')
-rw-r--r--sbin/unwind/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/unwind/parse.y b/sbin/unwind/parse.y
index 9c1a48bd3de..1c02f76c7ad 100644
--- a/sbin/unwind/parse.y
+++ b/sbin/unwind/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.9 2019/10/18 06:00:46 otto Exp $ */
+/* $OpenBSD: parse.y,v 1.10 2019/10/18 06:03:25 otto Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -162,6 +162,8 @@ varset : STRING '=' string {
if (isspace((unsigned char)*s)) {
yyerror("macro name cannot contain "
"whitespace");
+ free($1);
+ free($3);
YYERROR;
}
}