From: Dario Faggioli <dario.faggioli@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Juergen Gross <jgross@suse.com>, Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH] libxl: only free vcpu info list when it is allocated
Date: Fri, 21 Oct 2016 19:26:16 +0200 [thread overview]
Message-ID: <1477070776.24930.145.camel@citrix.com> (raw)
In-Reply-To: <1477070247-32185-1-git-send-email-wei.liu2@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1114 bytes --]
On Fri, 2016-10-21 at 18:17 +0100, Wei Liu wrote:
> Clang complains nr_dom_vcpus may be used uninitialized after
> 4a6070ea9.
>
> The real issue is vinfo can be NULL and nr_dom_vcpus remains
> uninitialized if previous call fails.
>
If it were me doing this, I'd just have initialized nr_dom_vcpus to 0.
This is what I've always done when using libxl_numainfo_list_free(),
which is similar to this (then how did I miss doing it here? Oh,
well... :-/)
And since we're initializing vinfo to NULL already, initializing
nr_dom_vcpus as well makes things look more uniform.
That being said, this amounts to personal taste, you're the maintainer,
and it's not that I can't stand this solution, so:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-21 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 17:17 [PATCH] libxl: only free vcpu info list when it is allocated Wei Liu
2016-10-21 17:26 ` Dario Faggioli [this message]
2016-10-24 10:02 ` Wei Liu
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=1477070776.24930.145.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).