aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/virtio-gpu-base.c')
-rw-r--r--hw/display/virtio-gpu-base.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index 50c5373b65..37af256219 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -184,8 +184,7 @@ virtio_gpu_base_device_realize(DeviceState *qdev,
if (virtio_gpu_virgl_enabled(g->conf)) {
error_setg(&g->migration_blocker, "virgl is not yet migratable");
- if (migrate_add_blocker(g->migration_blocker, errp) < 0) {
- error_free(g->migration_blocker);
+ if (migrate_add_blocker(&g->migration_blocker, errp) < 0) {
return false;
}
}
@@ -253,10 +252,7 @@ virtio_gpu_base_device_unrealize(DeviceState *qdev)
{
VirtIOGPUBase *g = VIRTIO_GPU_BASE(qdev);
- if (g->migration_blocker) {
- migrate_del_blocker(g->migration_blocker);
- error_free(g->migration_blocker);
- }
+ migrate_del_blocker(&g->migration_blocker);
}
static void