diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-02-05 23:06:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-05 23:06:13 +0100 |
commit | f4d140e9a60ca76d36d4539059e463a5db6a3a9d (patch) | |
tree | a8aa779b326822e006afd2a2f8e609d726834c7f | |
parent | a4cd87e9dce6d38846f23d44df9e21f322f946df (diff) |
bus: properly unset default bus pointer when destroying last reference
-rw-r--r-- | src/libsystemd/sd-bus/sd-bus.c | 3 |
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) |