DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback
@ 2018-10-31 13:16 Darek Stojaczyk
  2018-10-31 13:35 ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Darek Stojaczyk @ 2018-10-31 13:16 UTC (permalink / raw)
  To: dev; +Cc: Darek Stojaczyk, qi.z.zhang, anatoly.burakov

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
Cc: qi.z.zhang@intel.com
Cc: anatoly.burakov@intel.com

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
---
 lib/librte_eal/common/hotplug_mp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c
index b68e4cabb..7c9fcc46c 100644
--- a/lib/librte_eal/common/hotplug_mp.c
+++ b/lib/librte_eal/common/hotplug_mp.c
@@ -243,7 +243,7 @@ static void __handle_primary_request(void *param)
 		da = calloc(1, sizeof(*da));
 		if (da == NULL) {
 			ret = -ENOMEM;
-			goto quit;
+			break;
 		}
 
 		ret = rte_devargs_parse(da, req->devargs);
@@ -266,6 +266,8 @@ static void __handle_primary_request(void *param)
 
 		ret = local_dev_remove(dev);
 quit:
+		free(da->args);
+		free(da);
 		break;
 	default:
 		ret = -EINVAL;
-- 
2.17.1

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

* Re: [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback
  2018-10-31 13:16 [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback Darek Stojaczyk
@ 2018-10-31 13:35 ` Zhang, Qi Z
  2018-11-01 23:07   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Qi Z @ 2018-10-31 13:35 UTC (permalink / raw)
  To: Stojaczyk, Dariusz, dev; +Cc: Burakov, Anatoly



> -----Original Message-----
> From: Stojaczyk, Dariusz
> Sent: Wednesday, October 31, 2018 8:17 AM
> To: dev@dpdk.org
> Cc: Stojaczyk, Dariusz <dariusz.stojaczyk@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>
> Subject: [PATCH] eal: fix memleak on device hotplug rollback
> 
> Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
> Cc: qi.z.zhang@intel.com
> Cc: anatoly.burakov@intel.com
> 
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Thanks
Qi

> ---
>  lib/librte_eal/common/hotplug_mp.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/common/hotplug_mp.c
> b/lib/librte_eal/common/hotplug_mp.c
> index b68e4cabb..7c9fcc46c 100644
> --- a/lib/librte_eal/common/hotplug_mp.c
> +++ b/lib/librte_eal/common/hotplug_mp.c
> @@ -243,7 +243,7 @@ static void __handle_primary_request(void *param)
>  		da = calloc(1, sizeof(*da));
>  		if (da == NULL) {
>  			ret = -ENOMEM;
> -			goto quit;
> +			break;
>  		}
> 
>  		ret = rte_devargs_parse(da, req->devargs); @@ -266,6 +266,8 @@
> static void __handle_primary_request(void *param)
> 
>  		ret = local_dev_remove(dev);
>  quit:
> +		free(da->args);
> +		free(da);
>  		break;
>  	default:
>  		ret = -EINVAL;
> --
> 2.17.1

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

* Re: [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback
  2018-10-31 13:35 ` Zhang, Qi Z
@ 2018-11-01 23:07   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-11-01 23:07 UTC (permalink / raw)
  To: Stojaczyk, Dariusz; +Cc: dev, Zhang, Qi Z, Burakov, Anatoly

31/10/2018 14:35, Zhang, Qi Z:
> From: Stojaczyk, Dariusz
> > 
> > Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
> > Cc: qi.z.zhang@intel.com
> > Cc: anatoly.burakov@intel.com
> > 
> > Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Would have been better with an explanation in the commit log.

Applied, thanks

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

end of thread, other threads:[~2018-11-01 23:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 13:16 [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback Darek Stojaczyk
2018-10-31 13:35 ` Zhang, Qi Z
2018-11-01 23:07   ` 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).