[dpdk-dev] [PATCH] vdev: fix rte_mp_request_sync() memleak on scan

Darek Stojaczyk dariusz.stojaczyk at intel.com
Thu Oct 25 12:47:35 CEST 2018


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 at intel.com
Cc: qi.z.zhang at intel.com
Cc: stable at dpdk.org

Signed-off-by: Paul Luse <paul.e.luse at intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk at 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



More information about the dev mailing list