avfilter/f_select: check ff_insert_outpad() for failure
authorPaul B Mahol <onemda@gmail.com>
Fri, 25 Aug 2017 08:04:28 +0000 (10:04 +0200)
committerPaul B Mahol <onemda@gmail.com>
Fri, 25 Aug 2017 08:05:09 +0000 (10:05 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/f_select.c

index c860262..b1b2cbc 100644 (file)
@@ -186,7 +186,10 @@ static av_cold int init(AVFilterContext *ctx)
             return AVERROR(ENOMEM);
         pad.type = ctx->filter->inputs[0].type;
         pad.request_frame = request_frame;
-        ff_insert_outpad(ctx, i, &pad);
+        if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) {
+            av_freep(&pad.name);
+            return ret;
+        }
     }
 
     return 0;