mirror of
https://github.com/systemd/systemd
synced 2024-10-15 12:34:37 +00:00
sd-journal: unset prioq index on failure
Otherwise, potentially, the assertion in journal_file_unlink_newest_by_bood_id() will be triggered.
This commit is contained in:
parent
e28d825127
commit
f11de491ca
|
@ -2353,8 +2353,10 @@ static int journal_file_reshuffle_newest_by_boot_id(sd_journal *j, JournalFile *
|
|||
return r;
|
||||
|
||||
r = hashmap_ensure_put(&j->newest_by_boot_id, &id128_hash_ops, &f->newest_boot_id, q);
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
f->newest_boot_id_prioq_idx = PRIOQ_IDX_NULL;
|
||||
return r;
|
||||
}
|
||||
|
||||
TAKE_PTR(q);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue