lavfi/aevalsrc: initialize pointer to expression to NULL
authorStefano Sabatini <stefasab@gmail.com>
Thu, 21 Nov 2013 22:13:16 +0000 (23:13 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Thu, 21 Nov 2013 22:14:38 +0000 (23:14 +0100)
Fix crash in case of expression parsing failure.

libavfilter/asrc_aevalsrc.c

index 4c1bbdf..41ad632 100644 (file)
@@ -101,6 +101,7 @@ static av_cold int init(AVFilterContext *ctx)
             ret = AVERROR(ENOMEM);
             goto end;
         }
+        eval->expr[eval->nb_channels-1] = NULL;
         ret = av_expr_parse(&eval->expr[eval->nb_channels - 1], expr, var_names,
                             NULL, NULL, NULL, NULL, 0, ctx);
         if (ret < 0)