From: Paul Luse Date: Fri, 21 Sep 2018 16:25:57 +0000 (-0400) Subject: bus/vdev: fix multi-process IPC buffer leak on scan X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=66fd3a3b0f5be39ba30a2d6aa617604c8d221230;p=dpdk.git bus/vdev: fix multi-process IPC buffer leak on scan This patch fixes an issue caught with ASAN where a vdev_scan() to a secondary bus was failing to free some memory. The doxygen comment in EAL is fixed at the same time. Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel") Fixes: 783b6e54971d ("eal: add synchronous multi-process communication") Cc: stable@dpdk.org Signed-off-by: Paul Luse Acked-by: Anatoly Burakov Acked-by: Ferruh Yigit --- diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 688e31c212..685cc4e78b 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"); diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 3ee897c1d7..6514a9fe65 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -316,7 +316,7 @@ rte_mp_sendmsg(struct rte_mp_msg *msg); * * @param reply * The reply argument will be for storing all the replied messages; - * the caller is responsible for free reply->replies. + * the caller is responsible for free reply->msgs. * * @param ts * The ts argument specifies how long we can wait for the peer(s) to reply.