dbus-python/dbus-python-0.83.0-memleak.patch

20 lines
692 B
Diff

--- dbus/connection.py.orig 2008-09-13 14:54:49.000000000 +0200
+++ dbus/connection.py 2008-09-13 14:55:01.000000000 +0200
@@ -484,7 +484,15 @@
deletions.append(match)
else:
new.append(match)
- by_member[signal_name] = new
+
+ if new:
+ by_member[signal_name] = new
+ else:
+ del by_member[signal_name]
+ if not by_member:
+ del by_interface[dbus_interface]
+ if not by_interface:
+ del self._signal_recipients_by_object_path[path]
finally:
self._signals_lock.release()