tools/ffhash: close file handle on error

Fixes CID1026768

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-06-02 22:52:23 +02:00
parent de488525e5
commit c1075d6af7
1 changed files with 1 additions and 0 deletions

View File

@ -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;