From: Lasya Venneti Subject: [PATCH] Handles the error returned by the xc_dom_allocate function Date: Sun, 25 Oct 2015 15:32:24 +0530 Message-ID: <1445767344-7780-2-git-send-email-comethalley61@gmail.com> References: <1445767344-7780-1-git-send-email-comethalley61@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZqI90-0005U2-Iz for xen-devel@lists.xenproject.org; Sun, 25 Oct 2015 10:03:18 +0000 Received: by padhk11 with SMTP id hk11so158671508pad.1 for ; Sun, 25 Oct 2015 03:03:15 -0700 (PDT) In-Reply-To: <1445767344-7780-1-git-send-email-comethalley61@gmail.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: xen-devel@lists.xenproject.org, george.dunlap@citrix.com, dario.faggioli@citrix.com, ian.campbell@citrix.com, wei.liu2@citrix.com, stefano.stebellini@eu.citrix.com, lars.kurth@citrix.com, comethalley61@gmail.com List-Id: xen-devel@lists.xenproject.org --- tools/xenstore/init-xenstore-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xenstore/init-xenstore-domain.c b/tools/xenstore/init-xenstore-domain.c index 0d12169..d17aab5 100644 --- a/tools/xenstore/init-xenstore-domain.c +++ b/tools/xenstore/init-xenstore-domain.c @@ -42,6 +42,8 @@ static int build(xc_interface *xch, int argc, char** argv) snprintf(cmdline, 512, "--event %d --internal-db", rv); dom = xc_dom_allocate(xch, cmdline, NULL); + if(dom==NULL) + return -1; rv = xc_dom_kernel_file(dom, argv[1]); if (rv) goto err; -- 1.9.1