diff --git a/tools/firewire/nosy-dump.c b/tools/firewire/nosy-dump.c index 9a906de3a9ef..9cc8626a7e94 100644 --- a/tools/firewire/nosy-dump.c +++ b/tools/firewire/nosy-dump.c @@ -1014,7 +1014,8 @@ int main(int argc, const char *argv[]) if (output != NULL) fclose(output); - close(fd); + if (fd >= 0) + close(fd); poptFreeContext(con);