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

[Xen-devel] [PATCH 1/4] libxenstat: check xc_interface_open return value



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Charles Arnold <carnold@xxxxxxxx>
---
 tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/xenstat/libxenstat/src/xenstat_qmp.c 
b/tools/xenstat/libxenstat/src/xenstat_qmp.c
index 2cb99e9..f3aeec4 100644
--- a/tools/xenstat/libxenstat/src/xenstat_qmp.c
+++ b/tools/xenstat/libxenstat/src/xenstat_qmp.c
@@ -366,6 +366,8 @@ static xc_domaininfo_t *get_domain_ids(int *num_doms)
        if (dominfo == NULL)
                return NULL;
        xc_handle = xc_interface_open(0,0,0);
+       if (xc_handle == NULL)
+               return NULL;
        *num_doms = xc_domain_getinfolist(xc_handle, 0, 1024, dominfo);
        xc_interface_close(xc_handle);
        return dominfo;
-- 
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®.