You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/xen-tools/files/xen-tools-4-CVE-2014-1950-X...

28 lines
851 B

From: Andrew Cooper <andrew.cooper3@citrix.com>
Date: Wed, 22 Jan 2014 17:47:21 +0000
Subject: 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>
---
tools/libxc/xc_cpupool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/libxc/xc_cpupool.c b/tools/libxc/xc_cpupool.c
index c8c2a33..6393cfb 100644
--- a/tools/libxc/xc_cpupool.c
+++ b/tools/libxc/xc_cpupool.c
@@ -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;