[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xl: check for libxl_list_vm failure in print_uptime
Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index bd26bcc..7c5b9ec 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -6245,6 +6245,10 @@ static void print_uptime(int short_mode, uint32_t doms[], int nb_doms) if (nb_doms == 0) { print_dom0_uptime(short_mode, now); info = libxl_list_vm(ctx, &nb_vm); + if (info == NULL) { + fprintf(stderr, "Could not list vms.\n"); + return; + } for (i = 0; i < nb_vm; i++) print_domU_uptime(info[i].domid, short_mode, now); libxl_vminfo_list_free(info, nb_vm); -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |