Skip to content

Commit ab36edc

Browse files
jasowangmstsirkin
authored andcommitted
vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
Fixes: 1e0a84e ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: Jason Wang <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent f47a47e commit ab36edc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/vhost-vdpa.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static int vhost_vdpa_add(NetClientState *ncs, void *be)
110110
err:
111111
if (net) {
112112
vhost_net_cleanup(net);
113+
g_free(net);
113114
}
114115
return -1;
115116
}

0 commit comments

Comments
 (0)