[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xl: check for libxl_list_vm failure in print_uptime
commit df34300fdbb63dffa32e2b158ab5c34fdd0facb5 Author: Matthew Daley <mattd@xxxxxxxxxxx> AuthorDate: Sat Dec 14 14:15:21 2013 +1300 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Mon Dec 16 11:57:23 2013 +0000 xl: check for libxl_list_vm failure in print_uptime Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) 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); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |