summaryrefslogtreecommitdiff
path: root/libavutil/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r--libavutil/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 3833ca87f2..4e2cb1095c 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -500,6 +500,7 @@ 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;
@@ -601,7 +602,7 @@ int main(int argc, char **argv)
"-PI",
"+PI",
"1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
- "80G/80Gi"
+ "80G/80Gi",
"1k",
"1Gi",
"1gi",