mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
tools/ffhash: close file handle on error
Fixes CID1026768 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
de488525e5
commit
c1075d6af7
@ -89,6 +89,7 @@ static int check(char *file)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
ssize_t size = read(fd, buffer, SIZE);
|
ssize_t size = read(fd, buffer, SIZE);
|
||||||
if (size < 0) {
|
if (size < 0) {
|
||||||
|
close(fd);
|
||||||
finish();
|
finish();
|
||||||
printf("+READ-FAILED: %s", strerror(errno));
|
printf("+READ-FAILED: %s", strerror(errno));
|
||||||
ret = 2;
|
ret = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user