diff options
| author | longlong yan <yanlonglong@kylinos.cn> | 2026-08-18 10:20:34 +0800 |
|---|---|---|
| committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-08-18 10:20:34 +0800 |
| commit | 78f56b3fee8fb4c6f851aa41f1eddad269aaf46c (patch) | |
| tree | d0e4d58413ff491fbf75a025b54769308bc760f2 /scripts/Makefile.thinlto | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-next-78f56b3fee8fb4c6f851aa41f1eddad269aaf46c.tar.gz linux-next-78f56b3fee8fb4c6f851aa41f1eddad269aaf46c.zip | |
tools/firewire: nosy-dump: guard close(fd) when reading from input file
The file descriptor fd is initialized to -1 and only opened via open()
when the --input option is not used. However, close(fd) is called
unconditionally at the end of main(), which results in close(-1) and
a spurious EBADF error when nosy-dump reads from an input file.
Guard the close() call with "if (fd >= 0)" to match the existing
conditional cleanup pattern used for the output file handle.
Signed-off-by: longlong yan <yanlonglong@kylinos.cn>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
