Skip to content
Snippets Groups Projects
Commit 0008e0d6 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

cmdutils: fix unclosed file on error


Fixes CID739865
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 58c2c17f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment