diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-03 01:19:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-03 01:19:21 +0200 |
commit | db9bb83fa5ec72da38eb5bd0c259ef8c76a71858 (patch) | |
tree | 51c14d1c1078f470fdfbf8f139757fa5fc022ad6 /src/libsystemd/sd-bus/sd-bus.c | |
parent | 7f0d207d2c816e0a8cb2742b0a789911f7c99356 (diff) |
bus: close a bus that failed to connect
Diffstat (limited to 'src/libsystemd/sd-bus/sd-bus.c')
-rw-r--r-- | src/libsystemd/sd-bus/sd-bus.c | 4 |
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); } |