mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 12:40:42 +01:00
Added missing reset of journal cursor
In one case there was possibility of free()'d value of journal cursor not being reset, causing double-free and crash later on.
This commit is contained in:
parent
e25edc8354
commit
9123293a2f
@ -474,6 +474,7 @@ persistJournalState(void)
|
||||
free(last_cursor);
|
||||
if ((ret = sd_journal_get_cursor(j, &last_cursor))) {
|
||||
LogError(-ret, RS_RET_ERR, "imjournal: sd_journal_get_cursor() failed");
|
||||
last_cursor = NULL;
|
||||
ABORT_FINALIZE(RS_RET_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user