]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
xenoprof: free domain's vcpu array
authorJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 12:36:52 +0000 (13:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 12:36:52 +0000 (13:36 +0100)
This was overlooked in fb442e2171 ("x86_64: allow more vCPU-s per
guest").

This is CVE-2015-7969 / XSA-151.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
xen/common/xenoprof.c

index 1061323ea0394049683c33b72c173831feef56dd..53a803a551344029210980128a294bc81ab37fc1 100644 (file)
@@ -239,6 +239,7 @@ static int alloc_xenoprof_struct(
     d->xenoprof->rawbuf = alloc_xenheap_pages(get_order_from_pages(npages), 0);
     if ( d->xenoprof->rawbuf == NULL )
     {
+        xfree(d->xenoprof->vcpu);
         xfree(d->xenoprof);
         d->xenoprof = NULL;
         return -ENOMEM;
@@ -286,6 +287,7 @@ void free_xenoprof_pages(struct domain *d)
         free_xenheap_pages(x->rawbuf, order);
     }
 
+    xfree(x->vcpu);
     xfree(x);
     d->xenoprof = NULL;
 }