summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDarek Stojaczyk <dariusz.stojaczyk@intel.com>2018-10-31 14:16:53 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-11-02 00:05:49 +0100
commit95781f4c64419a126b864f76dd1f00f9c01e0f43 (patch)
tree915e56a6f63632492fffd13b5e6f7156358e902b /lib
parentdf285f0e6529401fa8c33e00b1b8f889458dd18b (diff)
downloaddpdk-95781f4c64419a126b864f76dd1f00f9c01e0f43.zip
dpdk-95781f4c64419a126b864f76dd1f00f9c01e0f43.tar.gz
dpdk-95781f4c64419a126b864f76dd1f00f9c01e0f43.tar.xz
eal: fix memory leak on multi-process hotplug rollback
Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_eal/common/hotplug_mp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c
index b68e4ca..7c9fcc4 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;