mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxc: Fix out-of-memory error handling in xc_cpupool_getinfo()
Avoid freeing info then returning it to the caller.
This is XSA-88.
Coverity-ID: 1056192
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit d883c179a7)
This commit is contained in:
1 parent
ae5d69f1c6
commit
eba76e4112
1 file changed
+1
@@ -104,6 +104,7 @@ xc_cpupoolinfo_t *xc_cpupool_getinfo(xc_interface *xch,
|
||||
info->cpumap = xc_cpumap_alloc(xch);
|
||||
if (!info->cpumap) {
|
||||
free(info);
|
||||
info = NULL;
|
||||
goto out;
|
||||
}
|
||||
info->cpupool_id = sysctl.u.cpupool_op.cpupool_id;
|
||||
|
||||