[v2] net/softnic: fix memory leak as profile is freed
Checks
Commit Message
From: Dapeng Yu <dapengx.yu@intel.com>
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>
---
V2:
* Reapply patch on top of main branch.
* No difference from V1
---
drivers/net/softnic/rte_eth_softnic_action.c | 1 +
1 file changed, 1 insertion(+)
Comments
28/07/2021 08:05, dapengx.yu@intel.com:
> From: Dapeng Yu <dapengx.yu@intel.com>
>
> 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>
Applied, thanks.
@@ -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);
}
}