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

Fixes Coverity issue #1473500.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/371/head
Andreas Rheinhardt 4 years ago
parent 0364188fb9
commit 0858853241
  1. 2
      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);

Loading…
Cancel
Save