On 04/13/2011 02:32 AM, Jan Kiszka wrote:
From: Jan Kiszka<jan.kiszka@xxxxxxxxxxx> If kvm_arch_vcpu_setup failed, we leaked the allocated VCPU structure so far.
@@ -1609,18 +1609,18 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) r = kvm_arch_vcpu_setup(vcpu); if (r) - return r; + goto vcpu_destroy;
kvm_arch_vcpu_setup() (at least x86's) does a vcpu->free() on failure. I think the current code is correct (if confusing).
-- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html