[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1 of 4 V2] libxl: initialise cpupoolinfo in libxl__domain_scheduler



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1340956631 -3600
# Node ID d12ad3958ca787f565ba0fe67d7e97706314e46d
# Parent  850af6e1985ed0ed0393846c1aae749e2742de8a
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@xxxxxxxxxx>

diff -r 850af6e1985e -r d12ad3958ca7 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Fri Jun 29 08:57:11 2012 +0100
+++ b/tools/libxl/libxl_dom.c   Fri Jun 29 08:57:11 2012 +0100
@@ -81,6 +81,7 @@ libxl_scheduler libxl__domain_scheduler(
     if (cpupool < 0)
         return sched;
 
+    libxl_cpupoolinfo_init(&poolinfo);
     rc = libxl_cpupool_info(CTX, &poolinfo, cpupool);
     if (rc < 0)
         goto out;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.