DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vdev: fix rte_mp_request_sync() memleak on scan
@ 2018-10-25 10:47 Darek Stojaczyk
  2018-10-25 14:06 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Darek Stojaczyk @ 2018-10-25 10:47 UTC (permalink / raw)
  To: dev
  Cc: anatoly.burakov, Darek Stojaczyk, jianfeng.tan, qi.z.zhang,
	stable, Paul Luse

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

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: jianfeng.tan@intel.com
Cc: qi.z.zhang@intel.com
Cc: stable@dpdk.org

Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
---
 drivers/bus/vdev/vdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 688e31c21..685cc4e78 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -425,6 +425,7 @@ vdev_scan(void)
 			mp_rep = &mp_reply.msgs[0];
 			resp = (struct vdev_param *)mp_rep->param;
 			VDEV_LOG(INFO, "Received %d vdevs", resp->num);
+			free(mp_reply.msgs);
 		} else
 			VDEV_LOG(ERR, "Failed to request vdev from primary");
 
-- 
2.17.1

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

end of thread, other threads:[~2018-10-25 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 10:47 [dpdk-dev] [PATCH] vdev: fix rte_mp_request_sync() memleak on scan Darek Stojaczyk
2018-10-25 14:06 ` 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).