summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-07-14 16:13:34 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-07-14 16:13:34 +0100
commitd9821035d58c4fe161a9ff0a2546198e2c1dbb49 (patch)
treeaaee99f236deb1c113bfd139e7fb10064877c526
parent6d77f23d062f047437dc8ce428d86a7ad9fa05b2 (diff)
downloaddbus-python-d9821035d58c4fe161a9ff0a2546198e2c1dbb49.tar.gz
DBusPyServer: correctly unref the partially constructed DBusPyServer on errors
-rw-r--r--_dbus_bindings/server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/_dbus_bindings/server.c b/_dbus_bindings/server.c
index 8b59125..ab89f59 100644
--- a/_dbus_bindings/server.c
+++ b/_dbus_bindings/server.c
@@ -308,7 +308,7 @@ DBusPyServer_NewConsumingDBusServer(PyTypeObject *cls,
err:
DBG("Failed to construct Server from DBusServer at %p", server);
Py_XDECREF(mainloop);
-// Py_XDECREF(self);
+ Py_XDECREF(self);
Py_XDECREF(ref);
if (server) {
@@ -317,6 +317,7 @@ err:
dbus_server_unref(server);
Py_END_ALLOW_THREADS
}
+
DBG("%s() fail", __func__);
DBG_WHEREAMI;
return NULL;