mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
journal-upload: use _cleanup_ attribute to clear uploader
This commit is contained in:
parent
29cd4c8ffb
commit
c9ed608679
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user