On 12/08/2017 10:14 AM, Peng Hao wrote:
libvirt_virConnectDomainEventTunableCallback leak a PyObject.
Signed-off-by: Peng Hao <peng.hao2(a)zte.com.cn>
Signed-off-by: Wang Yechao <wang.yechao255(a)zte.com.cn>
---
libvirt-override.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index d746350..78a7f08 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -6662,11 +6662,11 @@ libvirt_virConnectDomainEventTunableCallback(virConnectPtr conn
ATTRIBUTE_UNUSED
if (!pyobj_ret) {
DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret);
PyErr_Print();
- Py_XDECREF(pyobj_dict);
} else {
Py_DECREF(pyobj_ret);
ret = 0;
}
+ Py_XDECREF(pyobj_dict);
LIBVIRT_RELEASE_THREAD_STATE;
return ret;
ACKed and pushed. Congratulations on your first libvirt-python contribution!
Michal