debuggers.hg
changeset 21278:59523ceaff36
xl: Fix segment fault of 'xl list'
If libxl_list_domain() returns NULL, segment fault occurs now.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
If libxl_list_domain() returns NULL, segment fault occurs now.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Apr 26 06:52:13 2010 +0100 (2010-04-26) |
parents | 7ccf597281d8 |
children | f766f2142a85 |
files | tools/libxl/xl.c |
line diff
1.1 --- a/tools/libxl/xl.c Mon Apr 26 06:50:39 2010 +0100 1.2 +++ b/tools/libxl/xl.c Mon Apr 26 06:52:13 2010 +0100 1.3 @@ -1521,7 +1521,7 @@ void list_domains(int verbose) 1.4 1.5 info = libxl_list_domain(&ctx, &nb_domain); 1.6 1.7 - if (info < 0) { 1.8 + if (!info) { 1.9 fprintf(stderr, "libxl_domain_infolist failed.\n"); 1.10 exit(1); 1.11 }