From b45a609831b2b6685f893a3a819464a2a1fd9e3b Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 18 Oct 2019 06:03:26 +0000 Subject: Plug mem leak in error path; ok florian@ who also spotted the rad case --- sbin/unwind/parse.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sbin') 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 @@ -162,6 +162,8 @@ varset : STRING '=' string { if (isspace((unsigned char)*s)) { yyerror("macro name cannot contain " "whitespace"); + free($1); + free($3); YYERROR; } } -- cgit v1.2.3