summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/sd-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/sd-bus.c')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 7074dc7246..dc54e211a4 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -3106,9 +3106,7 @@ _public_ int sd_bus_detach_event(sd_bus *bus) {
bus->quit_event_source = sd_event_source_unref(bus->quit_event_source);
}
- if (bus->event)
- bus->event = sd_event_unref(bus->event);
-
+ bus->event = sd_event_unref(bus->event);
return 1;
}