summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorThilo Borgmann <thilo.borgmann@mail.de>2024-01-07 13:54:06 +0100
committerThilo Borgmann <thilo.borgmann@mail.de>2024-01-07 13:59:02 +0100
commitc03c675d89a917bc530c34fde0c036b341858e13 (patch)
tree7384fb9e83553ca0591c262c8cf6b0efb37fd66b /libavfilter
parentb95ccfcadabb5a95544d71c206f984a72d03d7f0 (diff)
avfilter/fsync: Fix memory leak
Fixes a leak if s->last_frame is still set at the end of filtering. Found-by: James Almer
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_fsync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_fsync.c b/libavfilter/vf_fsync.c
index 58367e78f7..a18f1a009b 100644
--- a/libavfilter/vf_fsync.c
+++ b/libavfilter/vf_fsync.c
@@ -207,6 +207,9 @@ static int activate(AVFilterContext *ctx)
}
end:
+ if (s->last_frame)
+ av_frame_free(&s->last_frame);
+
ret = ff_inlink_consume_frame(inlink, &s->last_frame);
if (ret < 0)
return ret;