virtio-scsi: call unregister_savevm properly
This fixes a use-after-free when migrating after hot-unplug. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
fd9307912d
commit
eb2fa76418
@ -613,5 +613,7 @@ VirtIODevice *virtio_scsi_init(DeviceState *dev, VirtIOSCSIConf *proxyconf)
|
||||
|
||||
void virtio_scsi_exit(VirtIODevice *vdev)
|
||||
{
|
||||
VirtIOSCSI *s = (VirtIOSCSI *)vdev;
|
||||
unregister_savevm(s->qdev, "virtio-scsi", s);
|
||||
virtio_cleanup(vdev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user