mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
tail -F: fix crash
PR: 280910 (cherry picked from commit 308399a179a49b7b858c725de10177fdb0502fd2)
This commit is contained in:
parent
2a1e8d7c30
commit
cf4a34bbc7
1 changed files with 2 additions and 1 deletions
|
|
@ -382,7 +382,8 @@ follow(file_info_t *files, enum STYLE style, off_t off)
|
|||
sb2.st_dev != file->st.st_dev ||
|
||||
sb2.st_nlink == 0) {
|
||||
show(file);
|
||||
fclose(file->fp);
|
||||
if (file->fp != NULL)
|
||||
fclose(file->fp);
|
||||
file->fp = ftmp;
|
||||
memcpy(&file->st, &sb2,
|
||||
sizeof(struct stat));
|
||||
|
|
|
|||
Loading…
Reference in a new issue