From fa2f8973adf9cfb6cc2a69bcfe209b125ee3a3ce Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Sep 2015 14:13:10 +0200 Subject: 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. --- src/systemctl/systemctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/systemctl') 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; } -- cgit v1.2.3-54-g00ecf