journal: do not clear individual fields if the struct won't be reused

Especially that only some of the fields are cleared currently.
This commit is contained in:
Mike Yuan
2025-05-13 22:54:10 +02:00
parent 5884fafcd7
commit 2627c8e79e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ typedef struct Context {
static void context_done(Context *c) {
assert(c);
c->synchronize_varlink = sd_varlink_flush_close_unref(c->synchronize_varlink);
c->event = sd_event_unref(c->event);
sd_varlink_flush_close_unref(c->synchronize_varlink);
sd_event_unref(c->event);
sd_journal_close(c->journal);
}
+1 -1
View File
@@ -138,7 +138,7 @@ SyncReq* sync_req_free(SyncReq *req) {
LIST_REMOVE(pending_rqlen, req->server->sync_req_pending_rqlen, req);
}
req->idle_event_source = sd_event_source_disable_unref(req->idle_event_source);
sd_event_source_disable_unref(req->idle_event_source);
sd_varlink_unref(req->link);