mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: initialise cpupoolinfo in libxl__domain_scheduler
If libxl_cpupool_info fails then we would call libxl_cpupoolinfo_dispose on an uninitialised struct, and possibly free an invalid pointer. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
This commit is contained in:
1 parent
23c74ab2b2
commit
3b77aadeae
1 file changed
+1
@@ -81,6 +81,7 @@ libxl_scheduler libxl__domain_scheduler(libxl__gc *gc, uint32_t domid)
|
||||
if (cpupool < 0)
|
||||
return sched;
|
||||
|
||||
libxl_cpupoolinfo_init(&poolinfo);
|
||||
rc = libxl_cpupool_info(CTX, &poolinfo, cpupool);
|
||||
if (rc < 0)
|
||||
goto out;
|
||||
|
||||