DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix rte_mp_request_sync() memleak on device hotplug
@ 2018-10-25 10:46 Darek Stojaczyk
  2018-10-26 14:22 ` Burakov, Anatoly
  2018-10-29 11:47 ` [dpdk-dev] [PATCH v2] eal: fix IPC " Darek Stojaczyk
  0 siblings, 2 replies; 7+ messages in thread
From: Darek Stojaczyk @ 2018-10-25 10:46 UTC (permalink / raw)
  To: dev; +Cc: Darek Stojaczyk, qi.z.zhang, stable

rte_mp_request_sync() says that the caller is responsible
for freeing one of its parameters afterwards. EAL didn't
do that, causing a memory leak.

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

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
---
 lib/librte_eal/common/hotplug_mp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c
index 84f59d95b..9a6a88546 100644
--- a/lib/librte_eal/common/hotplug_mp.c
+++ b/lib/librte_eal/common/hotplug_mp.c
@@ -355,6 +355,7 @@ int eal_dev_hotplug_request_to_primary(struct eal_dev_mp_req *req)
 	resp = (struct eal_dev_mp_req *)mp_reply.msgs[0].param;
 	req->result = resp->result;
 
+	free(mp_reply.msgs);
 	return ret;
 }
 
@@ -397,6 +398,7 @@ int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
 		}
 	}
 
+	free(mp_reply.msgs);
 	return 0;
 }
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-31 17:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 10:46 [dpdk-dev] [PATCH] eal: fix rte_mp_request_sync() memleak on device hotplug Darek Stojaczyk
2018-10-26 14:22 ` Burakov, Anatoly
2018-10-29 12:02   ` Stojaczyk, Dariusz
2018-10-29 14:25     ` Zhang, Qi Z
2018-10-29 11:47 ` [dpdk-dev] [PATCH v2] eal: fix IPC " Darek Stojaczyk
2018-10-30 10:15   ` Burakov, Anatoly
2018-10-31 17:21     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).