]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_uspp.c
avfilter/vf_uspp: Fix leak of qp-table on error
[ffmpeg] / libavfilter / vf_uspp.c
index 8b39f53c3de9bdcdd50758d67db849b360fc8693..b77edeb244459ab3dab28d6b8add5ebcec1e8156 100644 (file)
@@ -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);