summary refs log tree commit diff stats
path: root/hw/net/vhost_net.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-07-27 01:15:01 +0400
committerMichael S. Tsirkin <mst@redhat.com>2016-07-29 00:33:46 +0300
commit5be5f9be724d43fbec3d6f955a43bc64a62d55cc (patch)
treef96f2a3e8fb4ae1fdef7354a6c8110c0d5d6d809 /hw/net/vhost_net.c
parent7b527247f09740920d8bc8aaa5ef4445256ca478 (diff)
downloadfocaccia-qemu-5be5f9be724d43fbec3d6f955a43bc64a62d55cc.tar.gz
focaccia-qemu-5be5f9be724d43fbec3d6f955a43bc64a62d55cc.zip
vhost: fix cleanup on not fully initialized device
If vhost_dev_init() failed, caller may still call vhost_dev_cleanup()
later. However, vhost_dev_cleanup() tries to remove the device from the
list even if it wasn't yet added, which may lead to crashes. Similarly
for the memory listener.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net/vhost_net.c')
0 files changed, 0 insertions, 0 deletions