diff -r 003acf02d416 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Jan 20 17:04:06 2011 +0000 +++ b/tools/libxl/xl_cmdimpl.c Fri Jan 21 17:11:10 2011 +0100 @@ -170,6 +170,10 @@ exit(2); } common_domname = was_name ? p : libxl_domid_to_name(&ctx, domid); + if (common_domname == NULL) { + fprintf(stderr, "%d is not a valid domain\n", domid); + exit(2); + } } static int acquire_lock(void)