summaryrefslogtreecommitdiff
path: root/libavfilter/vf_lut.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-18 21:31:54 +0100
committerAnton Khirnov <anton@khirnov.net>2013-05-17 07:42:28 +0200
commitb06848f4deccb998f019eadc9a72e595bb5db4a9 (patch)
treece871b0d102190c2281eeed9295fe8705ab95624 /libavfilter/vf_lut.c
parent1232a1647ab27e024a3baf4d01d40c8d08d6ced9 (diff)
vf_lut: make config_props work properly when called multiple times.
Do not leak the expressions.
Diffstat (limited to 'libavfilter/vf_lut.c')
-rw-r--r--libavfilter/vf_lut.c2
1 files changed, 2 insertions, 0 deletions
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) {