diff options
author | Jason Wang <jasowang@redhat.com> | 2021-09-03 17:10:18 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-04 17:34:05 -0400 |
commit | ab36edcfeaa292ca4c49c7ebb505f122ef06f9cc (patch) | |
tree | 8180d1c2d11f6091d9e16566dae99aa60edd0aeb /net | |
parent | f47a47e458bc12fbc2dc940ad9bb6cb8199f75bd (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/vhost-vdpa.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 3213e69d63..b43df00a85 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; } |