From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH] libxc: fix uninitialised usage of rc in meminit_hvm Date: Tue, 2 Feb 2016 12:37:21 +0000 Message-ID: <20160202123721.GA25660@citrix.com> References: <20160201071735.GA21091@gmail.com> <1454412800-2943-1-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aQaCz-0001nL-KT for xen-devel@lists.xenproject.org; Tue, 02 Feb 2016 12:37:25 +0000 Content-Disposition: inline In-Reply-To: <1454412800-2943-1-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: xen-devel@lists.xenproject.org, Roger Pau Monne , Ian Jackson , Ian Campbell , Wei Liu List-Id: xen-devel@lists.xenproject.org On Tue, Feb 02, 2016 at 12:33:20PM +0100, Roger Pau Monne wrote: > From: Roger Pau Monne > = > Due to the HVMlite changes there's a chance that the value in rc is check= ed > without being initialised. Fix this by initialising it to 0. > = > Signed-off-by: Roger Pau Monn=E9 > Reported-by: Olaf Hering Acked-by: Wei Liu > --- > Cc: Ian Jackson > Cc: Ian Campbell > Cc: Wei Liu > --- > tools/libxc/xc_dom_x86.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > = > diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c > index ef474a8..08337b2 100644 > --- a/tools/libxc/xc_dom_x86.c > +++ b/tools/libxc/xc_dom_x86.c > @@ -1259,7 +1259,7 @@ static int meminit_hvm(struct xc_dom_image *dom) > unsigned long p2m_size; > unsigned long target_pages =3D dom->target_pages; > unsigned long cur_pages, cur_pfn; > - int rc; > + int rc =3D 0; > xen_capabilities_info_t caps; > unsigned long stat_normal_pages =3D 0, stat_2mb_pages =3D 0, = > stat_1gb_pages =3D 0; > -- = > 2.5.4 (Apple Git-61) > =