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>
(cherry picked from commit 20e59af07e5e9a73cb3227355fe0a78afffdfe45)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-07-11 00:50:07 +02:00
parent f07a35b5e5
commit 62a772263e
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -239,8 +239,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);