summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgroups-agent.c1
-rw-r--r--src/initctl.c5
-rw-r--r--src/systemctl.c2
-rw-r--r--src/update-utmp.c5
4 files changed, 9 insertions, 4 deletions
diff --git a/src/cgroups-agent.c b/src/cgroups-agent.c
index 6f7a857eaf..30aeede943 100644
--- a/src/cgroups-agent.c
+++ b/src/cgroups-agent.c
@@ -82,6 +82,7 @@ int main(int argc, char *argv[]) {
finish:
if (bus) {
+ dbus_connection_flush(bus);
dbus_connection_close(bus);
dbus_connection_unref(bus);
}
diff --git a/src/initctl.c b/src/initctl.c
index 6c3ec02647..10db2dda18 100644
--- a/src/initctl.c
+++ b/src/initctl.c
@@ -232,8 +232,9 @@ static void server_done(Server *s) {
close_nointr_nofail(s->epoll_fd);
if (s->bus) {
- dbus_connection_close(s->bus);
- dbus_connection_unref(s->bus);
+ dbus_connection_flush(s->bus);
+ dbus_connection_close(s->bus);
+ dbus_connection_unref(s->bus);
}
}
diff --git a/src/systemctl.c b/src/systemctl.c
index ea09c3cf36..ecf3e013f2 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -4624,6 +4624,7 @@ finish:
dbus_message_unref(reply);
if (bus) {
+ dbus_connection_flush(bus);
dbus_connection_close(bus);
dbus_connection_unref(bus);
}
@@ -5039,6 +5040,7 @@ int main(int argc, char*argv[]) {
finish:
if (bus) {
+ dbus_connection_flush(bus);
dbus_connection_close(bus);
dbus_connection_unref(bus);
}
diff --git a/src/update-utmp.c b/src/update-utmp.c
index e45bee10ce..b06f5a06cb 100644
--- a/src/update-utmp.c
+++ b/src/update-utmp.c
@@ -406,8 +406,9 @@ finish:
#endif
if (c.bus) {
- dbus_connection_close(c.bus);
- dbus_connection_unref(c.bus);
+ dbus_connection_flush(c.bus);
+ dbus_connection_close(c.bus);
+ dbus_connection_unref(c.bus);
}
dbus_error_free(&error);