[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.6 08/13] xl: call libxl_dominfo_init in main_list
Also change the path that disposes of the buffer to use info_buf to avoid confusing coverity. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a4e56ef..79cef7a 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -4843,6 +4843,8 @@ int main_list(int argc, char **argv) info_free = info; } else if (optind == argc-1) { uint32_t domid = find_domain(argv[optind]); + + libxl_dominfo_init(&info_buf); rc = libxl_domain_info(ctx, &info_buf, domid); if (rc == ERROR_DOMAIN_NOTFOUND) { fprintf(stderr, "Error: Domain \'%s\' does not exist.\n", @@ -4869,7 +4871,7 @@ int main_list(int argc, char **argv) if (info_free) libxl_dominfo_list_free(info, nb_domain); else - libxl_dominfo_dispose(info); + libxl_dominfo_dispose(&info_buf); return 0; } -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |