mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
tools/libxl: Fix memory leak in sched_domain_output()
Coverity ID: 1055904
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
(cherry picked from commit 0792426b79)
Conflicts:
tools/libxl/xl_cmdimpl.c
This commit is contained in:
1 parent
8940a13d6d
commit
338a8b1375
1 file changed
+2
@@ -5003,6 +5003,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
|
||||
poolinfo = libxl_list_cpupool(ctx, &n_pools);
|
||||
if (!poolinfo) {
|
||||
fprintf(stderr, "error getting cpupool info\n");
|
||||
libxl_dominfo_list_free(info, nb_domain);
|
||||
return -ERROR_NOMEM;
|
||||
}
|
||||
|
||||
@@ -5024,6 +5025,7 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),
|
||||
}
|
||||
if (poolinfo)
|
||||
libxl_cpupoolinfo_list_free(poolinfo, n_pools);
|
||||
libxl_dominfo_list_free(info, nb_domain);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||