Thread (3 messages) 3 messages, 3 authors, 2018-11-01

[PATCH] eal: fix memleak on device hotplug rollback

STALE2891d

From: Darek Stojaczyk <hidden>
Date: 2018-10-31 13:19:57
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

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

Signed-off-by: Darek Stojaczyk <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help