[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Handles the error returned by the xc_dom_allocate function



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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.