diff options
| author | 2026-08-18 10:20:34 +0800 | |
|---|---|---|
| committer | 2026-08-18 10:20:34 +0800 | |
| commit | efc4506664ea4a713483bfc0b34078982ed7670a (patch) | |
| tree | 75ee3ccbdc3f22b0f0477bea98f1651833b6e931 /scripts/Makefile.thinlto | |
| parent | Linux 7.3 (diff) | |
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
