summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-05 23:06:13 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-05 23:06:13 +0100
commitf4d140e9a60ca76d36d4539059e463a5db6a3a9d (patch)
treea8aa779b326822e006afd2a2f8e609d726834c7f /src/libsystemd/sd-bus
parentman: introduce new "Desktop" property for sessions (diff)
downloadsystemd-f4d140e9a60ca76d36d4539059e463a5db6a3a9d.tar.xz
systemd-f4d140e9a60ca76d36d4539059e463a5db6a3a9d.zip
bus: properly unset default bus pointer when destroying last reference
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 4fdc246b7e..118769086e 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -132,6 +132,9 @@ static void bus_free(sd_bus *b) {
sd_bus_detach_event(b);
+ if (b->default_bus_ptr)
+ *b->default_bus_ptr = NULL;
+
bus_close_fds(b);
if (b->kdbus_buffer)