diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-10 21:15:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-10 21:15:44 +0100 |
commit | 0b3c84eb7da3a8c28ac248a68228f6a7edbb2e19 (patch) | |
tree | 94a7ea7f1aa53dd2b5b30813688029d4c2401bc6 /src/login | |
parent | pager: cache not only number of columns but also of lines before we open pager (diff) | |
download | systemd-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.c | 4 |
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(); |