aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/vhost-scsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 76bb875ca6..343ca8be7a 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -210,7 +210,7 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp)
if (err) {
error_propagate(errp, err);
error_free(vsc->migration_blocker);
- goto close_fd;
+ goto free_virtio;
}
}
@@ -240,6 +240,8 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp)
migrate_del_blocker(vsc->migration_blocker);
}
g_free(vsc->dev.vqs);
+ free_virtio:
+ virtio_scsi_common_unrealize(dev);
close_fd:
close(vhostfd);
return;