WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] xl: Fix segment fault of 'xl list'

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] xl: Fix segment fault of 'xl list'
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Mon, 26 Apr 2010 13:08:07 +0800
Delivery-date: Sun, 25 Apr 2010 22:08:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
If libxl_list_domain() returns NULL, segment fault occurs now.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>

diff -r c87ec146229a -r 5727e3c71513 tools/libxl/xl.c
--- a/tools/libxl/xl.c  Fri Apr 23 15:04:26 2010 +0100
+++ b/tools/libxl/xl.c  Mon Apr 26 21:07:19 2010 +0800
@@ -1521,7 +1521,7 @@
 
     info = libxl_list_domain(&ctx, &nb_domain);
 
-    if (info < 0) {
+    if (!info) {
         fprintf(stderr, "libxl_domain_infolist failed.\n");
         exit(1);
     }


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] xl: Fix segment fault of 'xl list', Yu Zhiguo <=