From 95781f4c64419a126b864f76dd1f00f9c01e0f43 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Wed, 31 Oct 2018 14:16:53 +0100 Subject: [PATCH] eal: fix memory leak on multi-process hotplug rollback Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Signed-off-by: Darek Stojaczyk Acked-by: Qi Zhang --- 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 b68e4cabb7..7c9fcc46c2 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.20.1