From: Darek Stojaczyk Date: Wed, 31 Oct 2018 13:16:53 +0000 (+0100) Subject: eal: fix memory leak on multi-process hotplug rollback X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=95781f4c64419a126b864f76dd1f00f9c01e0f43;p=dpdk.git 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 --- 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;