xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] dom variable error handled in Xenstore
@ 2015-10-28  0:12 Lasya
  2015-10-28  1:00 ` Dario Faggioli
  0 siblings, 1 reply; 9+ messages in thread
From: Lasya @ 2015-10-28  0:12 UTC (permalink / raw)
  To: xen-devel, george.dunlap, lars.kurth, dario.faggioli, wei.liu2,
	ian.campbell
  Cc: Lasya

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-02 12:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28  0:12 [PATCH v3] dom variable error handled in Xenstore Lasya
2015-10-28  1:00 ` 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

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).