summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpech <mpech@openbsd.org>2002-01-09 12:39:42 +0000
committermpech <mpech@openbsd.org>2002-01-09 12:39:42 +0000
commitbee0a9f20330e94e5b5bab7b997b3484b1fc2dc9 (patch)
tree6446c6ad4c7f34e272827abb449c3f700f76d6c2
parentAdd tests for 'no' translation rules and 'label' in filter rules. (diff)
downloadwireguard-openbsd-bee0a9f20330e94e5b5bab7b997b3484b1fc2dc9.tar.xz
wireguard-openbsd-bee0a9f20330e94e5b5bab7b997b3484b1fc2dc9.zip
free() 'interface' in {nat,binat,rdr}rule
dhartmei@ ok
-rw-r--r--sbin/pfctl/parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index ae0492cda36..bde262e3d72 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.51 2002/01/09 11:30:53 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.52 2002/01/09 12:39:42 mpech Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -821,6 +821,7 @@ natrule : no NAT interface proto FROM ipspec TO ipspec redirection
memcpy(nat.ifname, $3->ifname,
sizeof(nat.ifname));
nat.ifnot = $3->not;
+ free($3);
}
if ($4 != NULL) {
nat.proto = $4->proto;
@@ -888,6 +889,7 @@ binatrule : no BINAT interface proto FROM address TO ipspec redirection
if ($3 != NULL) {
memcpy(binat.ifname, $3->ifname,
sizeof(binat.ifname));
+ free($3);
}
if ($4 != NULL) {
binat.proto = $4->proto;
@@ -954,6 +956,7 @@ rdrrule : no RDR interface proto FROM ipspec TO ipspec dport redirection
memcpy(rdr.ifname, $3->ifname,
sizeof(rdr.ifname));
rdr.ifnot = $3->not;
+ free($3);
}
if ($4 != NULL) {
rdr.proto = $4->proto;