mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
c0c4bfbea8
commit
3483f006f3
1 file changed
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||