aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2021-09-03 17:10:18 +0800
committerMichael S. Tsirkin <mst@redhat.com>2021-09-04 17:34:05 -0400
commitab36edcfeaa292ca4c49c7ebb505f122ef06f9cc (patch)
tree8180d1c2d11f6091d9e16566dae99aa60edd0aeb
parentf47a47e458bc12fbc2dc940ad9bb6cb8199f75bd (diff)
downloadqemu-ab36edcfeaa292ca4c49c7ebb505f122ef06f9cc.zip
qemu-ab36edcfeaa292ca4c49c7ebb505f122ef06f9cc.tar.gz
qemu-ab36edcfeaa292ca4c49c7ebb505f122ef06f9cc.tar.bz2
vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-9-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--net/vhost-vdpa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 3213e69..b43df00 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -110,6 +110,7 @@ static int vhost_vdpa_add(NetClientState *ncs, void *be)
err:
if (net) {
vhost_net_cleanup(net);
+ g_free(net);
}
return -1;
}