summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index c25375c592..28fc19e2cf 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -1033,8 +1033,10 @@ _public_ int sd_bus_start(sd_bus *bus) {
else
return -EINVAL;
- if (r < 0)
+ if (r < 0) {
+ sd_bus_close(bus);
return r;
+ }
return bus_send_hello(bus);
}