From: Patrick Fu Date: Tue, 21 Jul 2020 12:10:57 +0000 (+0000) Subject: vhost: fix double-free with zero-copy X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a608436b635460c1be0d0d561838aa197cf32c87;p=dpdk.git vhost: fix double-free with zero-copy zmbufs should be set to NULL when getting freed to avoid double free on the same buffer pointer Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Cc: stable@dpdk.org Signed-off-by: Patrick Fu Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index df0db8a07d..9ddeae3622 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1934,6 +1934,7 @@ free_zmbufs(struct vhost_virtqueue *vq) drain_zmbuf_list(vq); rte_free(vq->zmbufs); + vq->zmbufs = NULL; } /*