From: Lasya <comethalley61@gmail.com>
To: xen-devel@lists.xenproject.org, george.dunlap@citrix.com,
lars.kurth@citrix.com, dario.faggioli@citrix.com,
wei.liu2@citrix.com, ian.campbell@citrix.com
Cc: Lasya <comethalley61@gmail.com>
Subject: [PATCH v3] dom variable error handled in Xenstore
Date: Wed, 28 Oct 2015 05:42:23 +0530 [thread overview]
Message-ID: <1445991143-9165-1-git-send-email-comethalley61@gmail.com> (raw)
xc_dom_allocate function in build function in init-xenstore-domain.c returns NULL on failure.
In that case, variable rv is set to ENOMEM and directed to failure path err.
Signed-off-by: Lasya Venneti <comethalley61@gmail.com>
---
tools/xenstore/init-xenstore-domain.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/xenstore/init-xenstore-domain.c b/tools/xenstore/init-xenstore-domain.c
index 0d12169..82ddabb 100644
--- a/tools/xenstore/init-xenstore-domain.c
+++ b/tools/xenstore/init-xenstore-domain.c
@@ -42,6 +42,10 @@ 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) {
+ rv = ENOMEM;
+ goto err;
+ }
rv = xc_dom_kernel_file(dom, argv[1]);
if (rv) goto err;
--
1.9.1
next reply other threads:[~2015-10-27 12:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 0:12 Lasya [this message]
2015-10-28 1:00 ` [PATCH v3] dom variable error handled in Xenstore Dario Faggioli
2015-10-28 19:12 ` Lasya Venneti
2015-10-29 10:07 ` Wei Liu
2015-10-29 10:11 ` Dario Faggioli
2015-10-29 14:58 ` Lasya Venneti
2015-10-30 14:28 ` Dario Faggioli
2015-11-02 12:03 ` Ian Campbell
2015-10-29 10:08 ` Dario Faggioli
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=1445991143-9165-1-git-send-email-comethalley61@gmail.com \
--to=comethalley61@gmail.com \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=lars.kurth@citrix.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).