WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix two leaks in the pyxc interface. The dictionaries ar

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix two leaks in the pyxc interface. The dictionaries are being added
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Nov 2005 16:54:06 +0000
Delivery-date: Tue, 08 Nov 2005 16:54:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix two leaks in the pyxc interface. The dictionaries are being added, Xen patchbot -unstable <=