diff options
author | Clément Bœsch <clement@stupeflix.com> | 2015-02-18 13:55:47 +0100 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2015-02-18 14:04:10 +0100 |
commit | 8087632027d755cd32ccc9e91ea025e276197055 (patch) | |
tree | ad4b194ce74524b0ba50433665dd27a36f912973 /libavfilter | |
parent | 80f44eafaa7a806928110eec8524f9d4f6c5b8e8 (diff) | |
download | ffmpeg-streaming-8087632027d755cd32ccc9e91ea025e276197055.zip ffmpeg-streaming-8087632027d755cd32ccc9e91ea025e276197055.tar.gz |
avfilter/showpalette: fix leak in case of error
Fixes CID1270820
Fixes CID1270818
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_showpalette.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_showpalette.c b/libavfilter/vf_showpalette.c index adcfeb4..e4d59b6 100644 --- a/libavfilter/vf_showpalette.c +++ b/libavfilter/vf_showpalette.c @@ -48,8 +48,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; |