aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi/virtio-scsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 4bc73a3..858b3aa 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -943,7 +943,13 @@ void virtio_scsi_common_unrealize(DeviceState *dev)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(dev);
+ int i;
+ virtio_del_queue(vdev, 0);
+ virtio_del_queue(vdev, 1);
+ for (i = 0; i < vs->conf.num_queues; i++) {
+ virtio_del_queue(vdev, i + 2);
+ }
g_free(vs->cmd_vqs);
virtio_cleanup(vdev);
}