]> Git Repo - qemu.git/commit
vhost: fix cleanup on not fully initialized device
authorMarc-André Lureau <[email protected]>
Tue, 26 Jul 2016 21:15:01 +0000 (01:15 +0400)
committerMichael S. Tsirkin <[email protected]>
Thu, 28 Jul 2016 21:33:46 +0000 (00:33 +0300)
commit5be5f9be724d43fbec3d6f955a43bc64a62d55cc
treef96f2a3e8fb4ae1fdef7354a6c8110c0d5d6d809
parent7b527247f09740920d8bc8aaa5ef4445256ca478
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 <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/virtio/vhost.c
This page took 0.021222 seconds and 4 git commands to generate.