mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avfilter/vf_vidstabtransform: close the transforms file on parse failure
Found-by: zhang xingxing Fixes: FILE leak Fixes: iXnhUsbrxJo8 Fixes: swarm-File-descriptor-leak-on-transform-file-parse-failure-4e8d03
This commit is contained in:
1 parent
87941e8765
commit
bb4b95c68f
1 file changed
+2
@@ -204,11 +204,13 @@ static int config_input(AVFilterLink *inlink)
|
||||
// calculate the actual transforms from the local motions
|
||||
if (vsLocalmotions2Transforms(td, &mlms, &tc->trans) != VS_OK) {
|
||||
av_log(ctx, AV_LOG_ERROR, "calculating transformations failed\n");
|
||||
fclose(f);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
} else { // try to read old format
|
||||
if (!vsReadOldTransforms(td, f, &tc->trans)) { /* read input file */
|
||||
av_log(ctx, AV_LOG_ERROR, "error parsing input file %s\n", tc->input);
|
||||
fclose(f);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user