summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-22 14:13:10 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-22 16:29:10 +0200
commitfa2f8973adf9cfb6cc2a69bcfe209b125ee3a3ce (patch)
treeb7ad811da7c64eac842f158f4297dd2545f3e35c /src/systemctl
parentc97e586d8a18db5dc505d76059ed1d9add234925 (diff)
sd-bus: introduce new sd_bus_default_flush_close() call
If code enqueues a message on one of the default busses, but doesn't sync on it, and immediately drops the reference to the bus again, it will stay queued and consume memory. Intrdouce a new call sd_bus_default_flush_close() that can be invoked at the end of programs (or threads) and flushes out all unsent messages on any of the default busses.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index e20fc1bbbb..10484a2b70 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7705,5 +7705,7 @@ finish:
strv_free(arg_states);
strv_free(arg_properties);
+ sd_bus_default_flush_close();
+
return r < 0 ? EXIT_FAILURE : r;
}