From: Avi Kivity <avi@redhat.com>
To: Uri Lublin <uril@qumranet.com>
Cc: kvm@vger.kernel.org
Subject: Re: libkvm: kvm_init: check kvm context allocation and zero it
Date: Tue, 23 Sep 2008 12:57:37 +0300 [thread overview]
Message-ID: <48D8BD91.1040104@redhat.com> (raw)
In-Reply-To: <1213889188-29683-1-git-send-email-uril@qumranet.com>
Uri Lublin wrote:
> Signed-off-by: Uri Lublin <uril@qumranet.com>
> ---
> libkvm/libkvm.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
> index 1e7bbed..62bcb90 100644
> --- a/libkvm/libkvm.c
> +++ b/libkvm/libkvm.c
> @@ -243,6 +243,9 @@ kvm_context_t kvm_init(struct kvm_callbacks *callbacks,
> kvm_abi = r;
> kvm_page_size = getpagesize();
> kvm = malloc(sizeof(*kvm));
> + if (kvm == NULL)
> + goto out_close;
> + memset(kvm, 0, sizeof(*kvm));
> kvm->fd = fd;
> kvm->vm_fd = -1;
> kvm->callbacks = callbacks;
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2008-09-23 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 15:26 libkvm: kvm_init: check kvm context allocation and zero it Uri Lublin
2008-09-23 9:57 ` Avi Kivity [this message]
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=48D8BD91.1040104@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=uril@qumranet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox