chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bus: fix memory leak when kdbus is not enabled
[elogind.git]
/
src
/
libsystemd
/
sd-bus
/
sd-bus.c
diff --git
a/src/libsystemd/sd-bus/sd-bus.c
b/src/libsystemd/sd-bus/sd-bus.c
index ffa3369feb377c077a7e00eda73b008af8fe93b9..ca7c428a31628d043d94a83e3705d8db6689a919 100644
(file)
--- 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
}