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@xensource.com>
Signed-off-by: Robert Read <robert@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2005-11-08 14:53:27 +01:00
1 parent c0c4bfbea8
commit 3483f006f3
1 file changed
+2 -1
+2 -1
View File
@@ -342,6 +342,7 @@ static PyObject *pyxc_domain_getinfo(PyObject *self,
"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 @@ static PyObject *pyxc_vcpu_getinfo(PyObject *self,
cpumap >>= 1;
}
PyDict_SetItemString(info_dict, "cpumap", cpulist);
Py_DECREF(cpulist);
return info_dict;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.