You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ffbuild/bin2c: misc fix
close input file if open output fail/read errors. Signed-off-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
@@ -38,8 +38,10 @@ int main(int argc, char **argv)
|
||||
return -1;
|
||||
|
||||
output = fopen(argv[2], "wb");
|
||||
if (!output)
|
||||
if (!output) {
|
||||
fclose(input);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (argc == 4) {
|
||||
name = argv[3];
|
||||
@@ -67,8 +69,10 @@ int main(int argc, char **argv)
|
||||
|
||||
fclose(output);
|
||||
|
||||
if (ferror(input) || !feof(input))
|
||||
if (ferror(input) || !feof(input)) {
|
||||
fclose(input);
|
||||
return -1;
|
||||
}
|
||||
|
||||
fclose(input);
|
||||
|
||||
|
Reference in New Issue
Block a user