summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-13 20:00:50 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-13 20:01:17 +0100
commit82923adfe5c4fa09cc91fd2a2e374c936cd4a186 (patch)
tree20a95e920e7ba1bb972515ae0df7ecfa55541712 /src/libsystemd/sd-bus
parent01dde0611bbf08f7e27aa8442f36eea2d0cca9de (diff)
bus: fix memory leak when kdbus is not enabled
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index ffa3369feb..ca7c428a31 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -1189,7 +1189,8 @@ _public_ int sd_bus_open_user(sd_bus **ret) {
#ifdef ENABLE_KDBUS
asprintf(&b->address, KERNEL_USER_BUS_FMT, (unsigned long) getuid());
#else
- return -ECONNREFUSED;
+ r = -ECONNREFUSED;
+ goto fail;
#endif
}