From: Anton Khirnov Date: Mon, 18 Mar 2013 20:31:54 +0000 (+0100) Subject: vf_lut: make config_props work properly when called multiple times. X-Git-Tag: android-x86-4.4-r1~364^2~1032 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b06848f4deccb998f019eadc9a72e595bb5db4a9;p=android-x86%2Fexternal-ffmpeg.git vf_lut: make config_props work properly when called multiple times. Do not leak the expressions. --- diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index 263bd537d2..348ef32326 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -245,6 +245,8 @@ static int config_props(AVFilterLink *inlink) double res; /* create the parsed expression */ + av_expr_free(s->comp_expr[comp]); + s->comp_expr[comp] = NULL; ret = av_expr_parse(&s->comp_expr[comp], s->comp_expr_str[comp], var_names, funcs1_names, funcs1, NULL, NULL, 0, ctx); if (ret < 0) {