diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-07-27 01:15:01 +0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-07-29 00:33:46 +0300 |
commit | 5be5f9be724d43fbec3d6f955a43bc64a62d55cc (patch) | |
tree | f96f2a3e8fb4ae1fdef7354a6c8110c0d5d6d809 /qemu-io-cmds.c | |
parent | 7b527247f09740920d8bc8aaa5ef4445256ca478 (diff) | |
download | qemu-5be5f9be724d43fbec3d6f955a43bc64a62d55cc.zip qemu-5be5f9be724d43fbec3d6f955a43bc64a62d55cc.tar.gz qemu-5be5f9be724d43fbec3d6f955a43bc64a62d55cc.tar.bz2 |
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 'qemu-io-cmds.c')
0 files changed, 0 insertions, 0 deletions