From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: Fix memory leak on VCPU creation error
Date: Sun, 17 Apr 2011 12:16:04 +0300 [thread overview]
Message-ID: <4DAAAFD4.3030900@redhat.com> (raw)
In-Reply-To: <4DA4E128.8070401@web.de>
On 04/13/2011 02:32 AM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> 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
next prev parent reply other threads:[~2011-04-17 9:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 23:32 [PATCH] KVM: Fix memory leak on VCPU creation error Jan Kiszka
2011-04-17 9:16 ` Avi Kivity [this message]
2011-04-17 11:01 ` [PATCH] KVM: Clean up error handling during VCPU creation Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DAAAFD4.3030900@redhat.com \
--to=avi@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.