Skip to content
Snippets Groups Projects
Commit 079427a5 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

journal: fix possible journal size retrieval race

refs #309
parent c329558a
Branches
Tags
No related merge requests found
......@@ -327,7 +327,7 @@ static int journal_open_file(journal_t *j)
/* Get journal file size. */
struct stat st;
if (stat(j->path, &st) < 0) {
if (fstat(j->fd, &st) < 0) {
dbg_journal_verb("journal: cannot get journal fsize\n");
goto open_file_error;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment