diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 279f99a7f2..c5cbeaddd1 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1333,7 +1333,7 @@ int kvm_arch_init_vcpu(CPUState *cs) r = kvm_arch_set_tsc_khz(cs); if (r < 0) { - goto fail; + return r; } /* vcpu's TSC frequency is either specified by user, or following @@ -1622,7 +1622,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (local_err) { error_report_err(local_err); error_free(invtsc_mig_blocker); - return r; + goto fail2; } } } @@ -1673,6 +1673,9 @@ int kvm_arch_init_vcpu(CPUState *cs) fail: migrate_del_blocker(invtsc_mig_blocker); + fail2: + migrate_del_blocker(vmx_mig_blocker); + return r; }