eal: fix memleak on device hotplug rollback
PATCH 1/1 eal: fix memleak on device hotplug rollback
Signed-off-by Darek Stojaczyk <[email protected]>
--- lib/librte_eal/common/hotplug_mp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/librte_eal/common/hotplug_mp.c +3 -1
@@ -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 ;
Signature · 1 line
2.17.1
Quoted 10 lines
-----Original Message-----
From: Stojaczyk, Dariusz
Sent: Wednesday, October 31, 2018 8:17 AM
To: [email protected]
Cc: Stojaczyk, Dariusz <[email protected]>; Zhang, Qi Z <[email protected]>; Burakov, Anatoly <[email protected]>
Subject: [PATCH] eal: fix memleak on device hotplug rollback
Quoted 5 lines
Signed-off-by Darek Stojaczyk <[email protected]>
Acked-by Qi Zhang <[email protected]>
Thanks
Qi
Quoted 29 lines
--- lib/librte_eal/common/hotplug_mp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)lib/librte_eal/common/hotplug_mp.c +1
-1@@ -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)lib/librte_eal/common/hotplug_mp.c +2
-1ret =local_dev_remove (dev); quit: +free (da->args); +free (da);break ;default : ret = -EINVAL ; --2.17.1
Thomas Monjalon
Applied31/10/2018 14:35, Zhang, Qi Z:
Quoted 9 lines
From: Stojaczyk, Dariusz
Quoted 6 lines
Signed-off-by Darek Stojaczyk <[email protected]>Acked-by Qi Zhang <[email protected]>
Would have been better with an explanation in the commit log.
Applied, thanks