summaryrefslogtreecommitdiff
path: root/libavutil/eval.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-01 15:45:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-01 15:59:58 +0200
commit61123634dda06384980ea66289af1b378246b47d (patch)
treef36a9e96d695a130b08dce38353dfd6e81f62597 /libavutil/eval.c
parentb63c9a999047567abb50871e361e1e73ed8c7995 (diff)
downloadffmpeg-61123634dda06384980ea66289af1b378246b47d.tar.gz
avutil/eval: factor av_expr_free() calls out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r--libavutil/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 5099e57fae..ea318560de 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -683,19 +683,19 @@ int av_expr_parse(AVExpr **expr, const char *s,
if ((ret = parse_expr(&e, &p)) < 0)
goto end;
if (*p.s) {
- av_expr_free(e);
av_log(&p, AV_LOG_ERROR, "Invalid chars '%s' at the end of expression '%s'\n", p.s, s0);
ret = AVERROR(EINVAL);
goto end;
}
if (!verify_expr(e)) {
- av_expr_free(e);
ret = AVERROR(EINVAL);
goto end;
}
e->var= av_mallocz(sizeof(double) *VARS);
*expr = e;
+ e = NULL;
end:
+ av_expr_free(e);
av_free(w);
return ret;
}