chiark / gitweb /
bus: properly unset default bus pointer when destroying last reference
authorLennart Poettering <lennart@poettering.net>
Wed, 5 Feb 2014 22:06:13 +0000 (23:06 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Feb 2014 22:06:13 +0000 (23:06 +0100)
src/libsystemd/sd-bus/sd-bus.c

index 4fdc246..1187690 100644 (file)
@@ -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)