net/softnic: fix memory leak as profile is freed

In function softnic_table_action_profile_free(), the memory referenced
by pointer "ap" in the instance of "struct softnic_table_action_profile"
is not freed.

This patch fixes it.

Fixes: a737dd4e5863 ("net/softnic: add table action profile")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
This commit is contained in:
Dapeng Yu 2021-07-28 14:05:39 +08:00 committed by Thomas Monjalon
parent 51799b4f97
commit b3bc560bd6

View File

@ -183,6 +183,7 @@ softnic_table_action_profile_free(struct pmd_internals *p)
break;
TAILQ_REMOVE(&p->table_action_profile_list, profile, node);
rte_table_action_profile_free(profile->ap);
free(profile);
}
}