aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-01-21 23:44:51 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-01-22 02:28:53 +0100
commit0a5add45c7527bbe627899be744f962588e5b2fa (patch)
tree15f52e95038f045e36354dfc60a8ec38df90268f
parentd40a1ae7ecfe17b355c194d258d037385ceab2ad (diff)
downloadffmpeg-0a5add45c7527bbe627899be744f962588e5b2fa.tar.gz
avfilter/af_hdcd: Fix leak of memory allocated by ff_make_format_list()
Fixes CID1396265 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/af_hdcd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index caee470c2e..1248fd9b75 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -1635,13 +1635,11 @@ static int query_formats(AVFilterContext *ctx)
return ret;
in_formats = ff_make_format_list(sample_fmts_in);
- out_formats = ff_make_format_list(sample_fmts_out);
- if (!in_formats || !out_formats)
- return AVERROR(ENOMEM);
-
ret = ff_formats_ref(in_formats, &inlink->out_formats);
if (ret < 0)
return ret;
+
+ out_formats = ff_make_format_list(sample_fmts_out);
ret = ff_formats_ref(out_formats, &outlink->in_formats);
if (ret < 0)
return ret;