nat: memory leak on nat44_plugin_disable 40/35140/2
authorSteven Luong <sluong@cisco.com>
Fri, 28 Jan 2022 16:28:04 +0000 (08:28 -0800)
committerOle Tr�an <otroan@employees.org>
Tue, 1 Feb 2022 15:18:37 +0000 (15:18 +0000)
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

src/plugins/nat/nat44-ed/nat44_ed.c

index e389a81..c29ee54 100644 (file)
@@ -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;