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; }