Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2025 13:11:47 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 5c2d3093b27f - main - pfctl: Plug leak in error case of the common 'varset' implementations.
Message-ID:  <202506261311.55QDBlaR022678@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=5c2d3093b27fbea6501c2fb345a293bd4f524f75

commit 5c2d3093b27fbea6501c2fb345a293bd4f524f75
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-06-23 09:54:54 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-06-26 13:11:01 +0000

    pfctl: Plug leak in error case of the common 'varset' implementations.
    
    ok benno@
    
    Obtained from:  OpenBSD, krw <krw@openbsd.org>, 16a0a9064f
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pfctl/parse.y | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 1bd8e2bb55ad..e0bd5ce4aee0 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -902,6 +902,8 @@ varset		: STRING '=' varstring	{
 				if (isspace((unsigned char)*s)) {
 					yyerror("macro name cannot contain "
 					   "whitespace");
+					free($1);
+					free($3);
 					YYERROR;
 				}
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506261311.55QDBlaR022678>