systemd/0002-bus-fix-memory-leak-when-kdbus-is-not-enabled.patch

27 lines
853 B
Diff

From 82923adfe5c4fa09cc91fd2a2e374c936cd4a186 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 13 Mar 2014 20:00:50 +0100
Subject: [PATCH] bus: fix memory leak when kdbus is not enabled
---
src/libsystemd/sd-bus/sd-bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c
index ffa3369..ca7c428 100644
--- src/libsystemd/sd-bus/sd-bus.c
+++ 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
}
--
1.7.9.2