diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 09fc66a73c201a7696854590d9643ae0d597c1c1..1e5d07e31c14877512b33dd7ffe94b3167744359 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -171,6 +171,7 @@ static int request_frame(AVFilterLink *outlink)
                         s->frames_out++;
                         if (j > 0) s->dup++;
                     }
+                    av_frame_free(&buf);
                 } else {
                     /* for delta less or equal to 0, we should drop the frame,
                      * otherwise, we will have one or more extra frames */