提交 22d7108c 编写于 作者: T Thomas Huth 提交者: Paolo Bonzini

KVM: selftests: Fix kvm_vm_free() in cr4_cpuid_sync and vmx_tsc_adjust tests

The kvm_vm_free() statement here is currently dead code, since the loop
in front of it can only be left with the "goto done" that jumps right
after the kvm_vm_free(). Fix it by swapping the locations of the "done"
label and the kvm_vm_free().
Signed-off-by: NThomas Huth <thuth@redhat.com>
Message-Id: <20210826074928.240942-1-thuth@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 d22869af
......@@ -109,8 +109,7 @@ int main(int argc, char *argv[])
}
}
kvm_vm_free(vm);
done:
kvm_vm_free(vm);
return 0;
}
......@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
}
}
kvm_vm_free(vm);
done:
kvm_vm_free(vm);
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册