diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-08-25 10:27:19 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-08-25 10:27:19 +0200 |
commit | 5e706a2afb09009bad49c4b12aaa997acf4491b1 (patch) | |
tree | 46da86768e06ea4aeaea71a6613fdb2e56bb3d2f /libavfilter/split.c | |
parent | 0b940c95b2171cb1035c79b85492f5f6cdb060a6 (diff) | |
download | ffmpeg-5e706a2afb09009bad49c4b12aaa997acf4491b1.tar.gz |
avfilter/split: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/split.c')
-rw-r--r-- | libavfilter/split.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/split.c b/libavfilter/split.c index b85a221353..8b260a9ba3 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -47,7 +47,7 @@ typedef struct SplitContext { static av_cold int split_init(AVFilterContext *ctx) { SplitContext *s = ctx->priv; - int i; + int i, ret; for (i = 0; i < s->nb_outputs; i++) { char name[32]; @@ -59,7 +59,10 @@ static av_cold int split_init(AVFilterContext *ctx) if (!pad.name) return AVERROR(ENOMEM); - ff_insert_outpad(ctx, i, &pad); + if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { + av_freep(&pad.name); + return ret; + } } return 0; |