From f936e0f3e9cc3e8d0c5e093bb0ef9ae2483d60a0 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Thu, 26 Apr 2018 14:12:20 +0000 Subject: Plug leak in error case of the common 'varset' implementations. ok benno@ --- sbin/ipsecctl/parse.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sbin/ipsecctl') diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index d5ba39ee185..d9739724d32 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.169 2017/10/27 08:29:32 mpi Exp $ */ +/* $OpenBSD: parse.y,v 1.170 2018/04/26 14:12:19 krw Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -911,6 +911,8 @@ varset : STRING '=' string if (isspace((unsigned char)*s)) { yyerror("macro name cannot contain " "whitespace"); + free($1); + free($3); YYERROR; } } -- cgit v1.2.3