diff options
Diffstat (limited to 'block/vdi.c')
-rw-r--r-- | block/vdi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/block/vdi.c b/block/vdi.c index 96b78d5a43..0aeb940aa8 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -361,6 +361,7 @@ static int vdi_open(BlockDriverState *bs, QDict *options, int flags, VdiHeader header; size_t bmap_size; int ret; + Error *local_err = NULL; logout("\n"); @@ -471,7 +472,12 @@ static int vdi_open(BlockDriverState *bs, QDict *options, int flags, error_setg(&s->migration_blocker, "The vdi format used by node '%s' " "does not support live migration", bdrv_get_device_or_node_name(bs)); - migrate_add_blocker(s->migration_blocker); + ret = migrate_add_blocker(s->migration_blocker, &local_err); + if (local_err) { + error_propagate(errp, local_err); + error_free(s->migration_blocker); + goto fail_free_bmap; + } qemu_co_mutex_init(&s->write_lock); |