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

[Xen-changelog] [xen-unstable] xl: Fix segment fault of 'xl list'



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1272261133 -3600
# Node ID 59523ceaff36080224d576779fa7d3f9bcf1106a
# Parent  7ccf597281d8538e9778e5088c1cea2a6ddd61f5
xl: Fix segment fault of 'xl list'

If libxl_list_domain() returns NULL, segment fault occurs now.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
---
 tools/libxl/xl.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 7ccf597281d8 -r 59523ceaff36 tools/libxl/xl.c
--- a/tools/libxl/xl.c  Mon Apr 26 06:50:39 2010 +0100
+++ b/tools/libxl/xl.c  Mon Apr 26 06:52:13 2010 +0100
@@ -1521,7 +1521,7 @@ void list_domains(int verbose)
 
     info = libxl_list_domain(&ctx, &nb_domain);
 
-    if (info < 0) {
+    if (!info) {
         fprintf(stderr, "libxl_domain_infolist failed.\n");
         exit(1);
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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