ffmpeg | branch: master | Clément Bœsch <[email protected]> | Wed Feb 18 13:52:36 2015 +0100| [80f44eafaa7a806928110eec8524f9d4f6c5b8e8] | committer: Clément Bœsch
avfilter/palettegen: fix leak in case of error > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=80f44eafaa7a806928110eec8524f9d4f6c5b8e8 --- libavfilter/vf_palettegen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 1aa5e19..1f1e90f 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -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; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
