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 | efc4506664ea4a713483bfc0b34078982ed7670a (patch) | |
| tree | 75ee3ccbdc3f22b0f0477bea98f1651833b6e931 /rust/kernel/alloc/allocator | |
| parent | c03c1a14507dfaf8b856c2608f9ac216021fc222 (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 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
