aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ed
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2022-01-28 08:28:04 -0800
committerOle Tr�an <otroan@employees.org>2022-02-01 15:18:37 +0000
commitdafdcf7e6dc42c3bd73dc040ef67352f94956a71 (patch)
tree9e8d03c9c949885e487476b67aff54ce2f40de03 /src/plugins/nat/nat44-ed
parent53cee1579eb0bee09142a26285461638a796e99d (diff)
nat: memory leak on nat44_plugin_disable
We invoke nat_affinity_enable for nat44_plugin_enable. We need to invoke nat_affinity_disable for nat44_plugin_disable to free the memory for bihash. Type: fix Fixes: I2743f7b1104b627bcc5ef937e3a50655313a26ea Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I9adeb3225136e3fff853c2d5b8f9a30e98ddcf4c
Diffstat (limited to 'src/plugins/nat/nat44-ed')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.c b/src/plugins/nat/nat44-ed/nat44_ed.c
index e389a81aab1..c29ee54a6c4 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed.c
+++ b/src/plugins/nat/nat44-ed/nat44_ed.c
@@ -2584,6 +2584,8 @@ nat44_plugin_disable ()
clib_memset (&sm->rconfig, 0, sizeof (sm->rconfig));
+ nat_affinity_disable ();
+
sm->forwarding_enabled = 0;
sm->enabled = 0;