aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-25 00:32:34 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-25 00:32:34 +0200
commit0008e0d6321de1a6a51dafd28103d9fd5a9be325 (patch)
tree80b7830ba6e32421dfbb00e1cfcf7963dc5ecef7 /cmdutils.c
parent58c2c17f1dd298833980a5f56d4b5b0bf0a98252 (diff)
downloadffmpeg-0008e0d6321de1a6a51dafd28103d9fd5a9be325.tar.gz
cmdutils: fix unclosed file on error
Fixes CID739865 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index a504ca5ebf..e9565d2635 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1315,6 +1315,7 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size)
fseek(f, 0, SEEK_SET);
if (*size == (size_t)-1) {
av_log(NULL, AV_LOG_ERROR, "IO error: %s\n", strerror(errno));
+ fclose(f);
return AVERROR(errno);
}
*bufptr = av_malloc(*size + 1);