31 lines
855 B
Diff
31 lines
855 B
Diff
|
From aff26dfeea91e70032bdc99bdf5bb5a194dd431d Mon Sep 17 00:00:00 2001
|
||
|
From: Phil Sutter <phil@nwl.cc>
|
||
|
Date: Fri, 25 Mar 2022 10:30:29 +0100
|
||
|
Subject: [PATCH] connntrack: Fix for memleak when parsing -j arg
|
||
|
|
||
|
Have to free the strings allocated by split_address_and_port().
|
||
|
|
||
|
Fixes: 29b390a212214 ("conntrack: Support IPv6 NAT")
|
||
|
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||
|
(cherry picked from commit 42cb292d6c9e8567db2e30e183b1bd31093700ad)
|
||
|
---
|
||
|
src/conntrack.c | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git a/src/conntrack.c b/src/conntrack.c
|
||
|
index 06f60e85fa1ed..eea5fd339c831 100644
|
||
|
--- a/src/conntrack.c
|
||
|
+++ b/src/conntrack.c
|
||
|
@@ -2432,6 +2432,8 @@ int main(int argc, char *argv[])
|
||
|
nfct_set_nat_details(c, tmpl.ct, &ad,
|
||
|
port_str, family);
|
||
|
}
|
||
|
+ free(port_str);
|
||
|
+ free(nat_address);
|
||
|
}
|
||
|
break;
|
||
|
case 'w':
|
||
|
--
|
||
|
2.34.1
|
||
|
|