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

[Xen-changelog] Fix two leaks in the pyxc interface. The dictionaries are being added



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID e2bb85722b91fb6fe03531b08aa1e521db821cb4
# Parent  a5195bf5671d383372005366ffe190c59276d801
Fix two leaks in the pyxc interface. The dictionaries are being added
to lists, and an extra ref was being left behind.

Signed-off-by: Sean Perry <sean@xxxxxxxxxxxxx>
Signed-off-by: Robert Read <robert@xxxxxxxxxxxxx>

diff -r a5195bf5671d -r e2bb85722b91 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Tue Nov  8 11:31:43 2005
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Nov  8 13:53:27 2005
@@ -342,6 +342,7 @@
                                   "ssidref",   info[i].ssidref,
                                   "shutdown_reason", info[i].shutdown_reason);
         PyDict_SetItemString(info_dict, "handle", pyhandle);
+        Py_DECREF(pyhandle);
         PyList_SetItem(list, i, info_dict);
     }
 
@@ -388,7 +389,7 @@
         cpumap >>= 1;
     }
     PyDict_SetItemString(info_dict, "cpumap", cpulist);
-
+    Py_DECREF(cpulist);
     return info_dict;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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