migration: Don't free the reason after calling migrate_add_blocker
Function migrate_add_blocker will free the reason and set it to NULL if failure is returned. Signed-off-by: Bin Guo <guobin@linux.alibaba.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Link: https://lore.kernel.org/r/20251024205532.19883-1-guobin@linux.alibaba.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
986c3292c6
commit
74343a438c
2 changed files with 0 additions and 2 deletions
|
|
@ -841,7 +841,6 @@ static void kvm_arm_gicv3_realize(DeviceState *dev, Error **errp)
|
|||
error_setg(&kvm_nv_migration_blocker,
|
||||
"Live migration disabled because KVM nested virt is enabled");
|
||||
if (migrate_add_blocker(&kvm_nv_migration_blocker, errp)) {
|
||||
error_free(kvm_nv_migration_blocker);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1661,7 +1661,6 @@ sev_snp_launch_finish(SevCommonState *sev_common)
|
|||
ret = migrate_add_blocker(&sev_mig_blocker, &local_err);
|
||||
if (local_err) {
|
||||
error_report_err(local_err);
|
||||
error_free(sev_mig_blocker);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue