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>
This commit is contained in:
Andreas Rheinhardt 2021-03-12 14:55:53 +01:00
parent 0364188fb9
commit 0858853241
1 changed files with 2 additions and 0 deletions

View 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);