summaryrefslogtreecommitdiffstats
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-11-10 21:15:44 +0100
committerLennart Poettering <lennart@poettering.net>2017-11-10 21:15:44 +0100
commit0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19 (patch)
tree94a7ea7f1aa53dd2b5b30813688029d4c2401bc6 /src/login
parentpager: cache not only number of columns but also of lines before we open pager (diff)
downloadsystemd-0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19.tar.xz
systemd-0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19.zip
tree-wide: use _cleanup_(sd_bus_flush_close_unrefp) at various appropriate places
Let's shorten the code a bit.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/loginctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index f3231bc0e4..3e917cb3f5 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -1584,7 +1584,7 @@ static int loginctl_main(int argc, char *argv[], sd_bus *bus) {
}
int main(int argc, char *argv[]) {
- sd_bus *bus = NULL;
+ _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
int r;
setlocale(LC_ALL, "");
@@ -1607,8 +1607,6 @@ int main(int argc, char *argv[]) {
r = loginctl_main(argc, argv, bus);
finish:
- sd_bus_flush_close_unref(bus);
-
pager_close();
polkit_agent_close();