[FFmpeg-cvslog] tools/ffhash: close file handle on error
Michael Niedermayer
git at videolan.org
Sun Jun 2 22:59:49 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 2 22:52:23 2013 +0200| [c1075d6af72cf3a6d137d52ad8d7d168633efb7a] | committer: Michael Niedermayer
tools/ffhash: close file handle on error
Fixes CID1026768
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1075d6af72cf3a6d137d52ad8d7d168633efb7a
---
tools/ffhash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/ffhash.c b/tools/ffhash.c
index 8c4a9f1..00a2872 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;
More information about the ffmpeg-cvslog
mailing list