Browse Source

avfilter/palettegen: fix leak in case of error

tags/n2.6
Clément Bœsch 10 years ago
parent
commit
80f44eafaa
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavfilter/vf_palettegen.c

+ 4
- 1
libavfilter/vf_palettegen.c View File

@@ -90,8 +90,11 @@ static int query_formats(AVFilterContext *ctx)
static const enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
AVFilterFormats *in = ff_make_format_list(in_fmts);
AVFilterFormats *out = ff_make_format_list(out_fmts);
if (!in || !out)
if (!in || !out) {
av_freep(&in);
av_freep(&out);
return AVERROR(ENOMEM);
}
ff_formats_ref(in, &ctx->inputs[0]->out_formats);
ff_formats_ref(out, &ctx->outputs[0]->in_formats);
return 0;


Loading…
Cancel
Save