acl: memory leak in acl_fa_session_cleaner_process 48/36148/1
authorSteven Luong <sluong@cisco.com>
Mon, 16 May 2022 22:53:43 +0000 (15:53 -0700)
committerSteven Luong <sluong@cisco.com>
Tue, 17 May 2022 01:54:44 +0000 (18:54 -0700)
The statement
  pw0->pending_clear_sw_if_index_bitmap =
    clib_bitmap_dup (pw0->serviced_sw_if_index_bitmap);
will cause pw0->pending_clear_sw_if_index_bitmap's previous
vector to be gone. Need to free it prior to calling clib_bitmap_dup()

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I20de780e73daea7be17efa0bf660af2592cd4680

src/plugins/acl/sess_mgmt_node.c

index d0ec593..eb73fd0 100644 (file)
@@ -723,6 +723,7 @@ acl_fa_session_cleaner_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
                }
              else
                {
+                 clib_bitmap_free (pw0->pending_clear_sw_if_index_bitmap);
                  if (clear_all)
                    {
                      /* if we need to clear all, then just clear the interfaces that we are servicing */