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

Thomas Monjalon thomas at monjalon.net
Thu Oct 25 16:06:32 CEST 2018


This patch was already sent, reviewed and applied.
Why do you re-send it?

25/10/2018 12:47, Darek Stojaczyk:
> 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");
>  
> 







More information about the dev mailing list