summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-upload.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-26 05:24:55 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-08 18:09:40 +0900
commitc9ed608679b26d05782d43a571da2979b537389e (patch)
tree94c84b95ff8e99612d7430347eac223ecb5d698f /src/journal-remote/journal-upload.c
parent29cd4c8ffbd40d88c0c65c81bda6a6c205eb5ba2 (diff)
downloadsystemd-c9ed608679b26d05782d43a571da2979b537389e.tar.gz
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.c4
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;
}