diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-25 21:24:55 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-08 10:09:40 +0100 |
commit | c9ed608679b26d05782d43a571da2979b537389e (patch) | |
tree | 94c84b95ff8e99612d7430347eac223ecb5d698f /src/journal-remote/journal-upload.c | |
parent | journal-gateway: define main through macro (diff) | |
download | systemd-c9ed608679b26d05782d43a571da2979b537389e.tar.xz systemd-c9ed608679b26d05782d43a571da2979b537389e.zip |
journal-upload: use _cleanup_ attribute to clear uploader
Diffstat (limited to 'src/journal-remote/journal-upload.c')
-rw-r--r-- | src/journal-remote/journal-upload.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index 7f08809c54..fd282ca19c 100644 --- a/src/journal-remote/journal-upload.c +++ b/src/journal-remote/journal-upload.c @@ -762,7 +762,7 @@ static int open_journal(sd_journal **j) { } int main(int argc, char **argv) { - Uploader u; + _cleanup_(destroy_uploader) Uploader u = {}; int r; bool use_journal; @@ -853,8 +853,6 @@ cleanup: "STOPPING=1\n" "STATUS=Shutting down..."); - destroy_uploader(&u); - finish: return r >= 0 ? EXIT_SUCCESS : EXIT_FAILURE; } |