ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@gmail.com> | 
Fri Mar 12 14:55:53 2021 +0100| [0858853241925d0a45f58a4724f203d284a70f00] | 
committer: Andreas Rheinhardt

avfilter/vf_uspp: Fix leak of qp-table on error

Fixes Coverity issue #1473500.

Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0858853241925d0a45f58a4724f203d284a70f00
---

 libavfilter/vf_uspp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c
index 8b39f53c3d..b77edeb244 100644
--- a/libavfilter/vf_uspp.c
+++ b/libavfilter/vf_uspp.c
@@ -425,6 +425,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
                 out = ff_get_video_buffer(outlink, aligned_w, aligned_h);
                 if (!out) {
                     av_frame_free(&in);
+                    if (qp_table != uspp->non_b_qp_table)
+                        av_free(qp_table);
                     return AVERROR(ENOMEM);
                 }
                 av_frame_copy_props(out, in);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to