Skip to content

Commit

Permalink
vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
Browse files Browse the repository at this point in the history
Fixes: 1e0a84e ("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>
  • Loading branch information
jasowang authored and mstsirkin committed Sep 4, 2021
1 parent f47a47e commit ab36edc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/vhost-vdpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ab36edc

Please sign in to comment.