xl: Fix segment fault of 'xl list'
If libxl_list_domain() returns NULL, segment fault occurs now.
Signed-off-by Yu Zhiguo <[email protected]>
tools/libxl/xl.c +1 -1
@@ -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 ); }