diff --git a/tools/ffhash.c b/tools/ffhash.c index 8c4a9f1b0b..00a2872717 100644 --- a/tools/ffhash.c +++ b/tools/ffhash.c @@ -89,6 +89,7 @@ static int check(char *file) for (;;) { ssize_t size = read(fd, buffer, SIZE); if (size < 0) { + close(fd); finish(); printf("+READ-FAILED: %s", strerror(errno)); ret = 2;