Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- libvirt-override.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index 14aa0e9..114104b 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -2303,12 +2303,9 @@ libvirt_virRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self, pyobj_f); virSetErrorFunc(NULL, libvirt_virErrorFuncHandler); - if (libvirt_virPythonErrorFuncHandler != NULL) { - Py_XDECREF(libvirt_virPythonErrorFuncHandler); - } - if (libvirt_virPythonErrorFuncCtxt != NULL) { - Py_XDECREF(libvirt_virPythonErrorFuncCtxt); - } + + Py_XDECREF(libvirt_virPythonErrorFuncHandler); + Py_XDECREF(libvirt_virPythonErrorFuncCtxt); if ((pyobj_f == Py_None) && (pyobj_ctx == Py_None)) { libvirt_virPythonErrorFuncHandler = NULL; -- 2.5.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list