Browse Source

avutil/eval: factor av_expr_free() calls out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
61123634dd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavutil/eval.c

+ 2
- 2
libavutil/eval.c View File

@@ -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;
}


Loading…
Cancel
Save