summaryrefslogtreecommitdiff
path: root/src/locale/localectl.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-01-28 22:49:17 +0100
committerMichael Biebl <biebl@debian.org>2018-01-28 22:49:17 +0100
commit1d42b86df9052528a8f56b2f52d8bc2faf87b2da (patch)
tree0d80f37a1ad6f02067261ee3e7ee62e1869fcd56 /src/locale/localectl.c
parent52ad194e0b816b8273dd8d0fea3e6d467f6ca34e (diff)
downloadsystemd-1d42b86df9052528a8f56b2f52d8bc2faf87b2da.tar.gz
New upstream version 237
Diffstat (limited to 'src/locale/localectl.c')
-rw-r--r--src/locale/localectl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index f09fe42626..af39e431f5 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -595,7 +595,7 @@ static int localectl_main(sd_bus *bus, int argc, char *argv[]) {
}
int main(int argc, char*argv[]) {
- _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
+ sd_bus *bus = NULL;
int r;
setlocale(LC_ALL, "");
@@ -615,6 +615,9 @@ int main(int argc, char*argv[]) {
r = localectl_main(bus, argc, argv);
finish:
+ /* make sure we terminate the bus connection first, and then close the
+ * pager, see issue #3543 for the details. */
+ sd_bus_flush_close_unref(bus);
pager_close();
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;