aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-07-11 00:50:07 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-12 21:58:50 +0200
commit20e59af07e5e9a73cb3227355fe0a78afffdfe45 (patch)
treee4998332e4b2262faf3fc5e9bc679e74fb6ca3ef
parente6c0c5731e85f00b5840d9a7d14e38cc3e07d5bc (diff)
downloadffmpeg-20e59af07e5e9a73cb3227355fe0a78afffdfe45.tar.gz
avfilter/vf_tiltandshift: Free dst on error
Fixes: CID1559901 Resource leak Sponsored-by: Sovereign Tech Fund Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/vf_tiltandshift.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
index b49a713339..08bcb06247 100644
--- a/libavfilter/vf_tiltandshift.c
+++ b/libavfilter/vf_tiltandshift.c
@@ -237,8 +237,10 @@ static int output_frame(AVFilterLink *outlink)
// set correct timestamps and props as long as there is proper input
ret = av_frame_copy_props(dst, s->input);
- if (ret < 0)
+ if (ret < 0) {
+ av_frame_free(&dst);
return ret;
+ }
// discard frame at the top of the list since it has been fully processed
list_remove_head(s);