DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/softnic: fix memory leak as profile is freed
@ 2021-07-13  8:27 dapengx.yu
  2021-07-14 11:17 ` Singh, Jasvinder
  2021-07-28  6:05 ` [dpdk-dev] [PATCH v2] " dapengx.yu
  0 siblings, 2 replies; 4+ messages in thread
From: dapengx.yu @ 2021-07-13  8:27 UTC (permalink / raw)
  To: Jasvinder Singh, Cristian Dumitrescu; +Cc: dev, Dapeng Yu, stable

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>
---
 drivers/net/softnic/rte_eth_softnic_action.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c
index 92c744dc9a..33be9552a6 100644
--- a/drivers/net/softnic/rte_eth_softnic_action.c
+++ b/drivers/net/softnic/rte_eth_softnic_action.c
@@ -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);
 	}
 }
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/softnic: fix memory leak as profile is freed
  2021-07-13  8:27 [dpdk-dev] [PATCH] net/softnic: fix memory leak as profile is freed dapengx.yu
@ 2021-07-14 11:17 ` Singh, Jasvinder
  2021-07-28  6:05 ` [dpdk-dev] [PATCH v2] " dapengx.yu
  1 sibling, 0 replies; 4+ messages in thread
From: Singh, Jasvinder @ 2021-07-14 11:17 UTC (permalink / raw)
  To: Yu, DapengX, Dumitrescu, Cristian; +Cc: dev, stable



> -----Original Message-----
> From: Yu, DapengX <dapengx.yu@intel.com>
> Sent: Tuesday, July 13, 2021 9:27 AM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/softnic: fix memory leak as profile is freed
> 
> 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>
> ---
>  drivers/net/softnic/rte_eth_softnic_action.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/softnic/rte_eth_softnic_action.c
> b/drivers/net/softnic/rte_eth_softnic_action.c
> index 92c744dc9a..33be9552a6 100644
> --- a/drivers/net/softnic/rte_eth_softnic_action.c
> +++ b/drivers/net/softnic/rte_eth_softnic_action.c
> @@ -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);
>  	}
>  }
> --
> 2.27.0

Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] net/softnic: fix memory leak as profile is freed
  2021-07-13  8:27 [dpdk-dev] [PATCH] net/softnic: fix memory leak as profile is freed dapengx.yu
  2021-07-14 11:17 ` Singh, Jasvinder
@ 2021-07-28  6:05 ` dapengx.yu
  2021-07-30 11:53   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: dapengx.yu @ 2021-07-28  6:05 UTC (permalink / raw)
  To: Jasvinder Singh, Cristian Dumitrescu; +Cc: dev, Dapeng Yu, stable

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(+)

diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c
index 92c744dc9a..33be9552a6 100644
--- a/drivers/net/softnic/rte_eth_softnic_action.c
+++ b/drivers/net/softnic/rte_eth_softnic_action.c
@@ -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);
 	}
 }
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/softnic: fix memory leak as profile is freed
  2021-07-28  6:05 ` [dpdk-dev] [PATCH v2] " dapengx.yu
@ 2021-07-30 11:53   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2021-07-30 11:53 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Jasvinder Singh, Cristian Dumitrescu, dev, stable

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-30 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13  8:27 [dpdk-dev] [PATCH] net/softnic: fix memory leak as profile is freed dapengx.yu
2021-07-14 11:17 ` Singh, Jasvinder
2021-07-28  6:05 ` [dpdk-dev] [PATCH v2] " dapengx.yu
2021-07-30 11:53   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).