avfilter/af_join: check ff_insert_inpad() for failure
authorPaul B Mahol <onemda@gmail.com>
Fri, 25 Aug 2017 07:49:01 +0000 (09:49 +0200)
committerPaul B Mahol <onemda@gmail.com>
Fri, 25 Aug 2017 07:49:01 +0000 (09:49 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_join.c

index 74ecce0..f8af0a1 100644 (file)
@@ -232,7 +232,10 @@ static av_cold int join_init(AVFilterContext *ctx)
 
         pad.needs_fifo = 1;
 
-        ff_insert_inpad(ctx, i, &pad);
+        if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) {
+            av_freep(&pad.name);
+            return ret;
+        }
     }
 
     return 0;