summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-06-02 20:52:23 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-06-02 20:52:23 (GMT)
commitc1075d6af72cf3a6d137d52ad8d7d168633efb7a (patch)
tree9f639c77aadd05a7e7a2730f1a81fc8eba16e233
parentde488525e5932235813e6d5f30a7554bf927a87a (diff)
downloadffmpeg-c1075d6af72cf3a6d137d52ad8d7d168633efb7a.zip
ffmpeg-c1075d6af72cf3a6d137d52ad8d7d168633efb7a.tar.gz
ffmpeg-c1075d6af72cf3a6d137d52ad8d7d168633efb7a.tar.bz2
tools/ffhash: close file handle on error
Fixes CID1026768 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--tools/ffhash.c1
1 files changed, 1 insertions, 0 deletions
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;