[FFmpeg-cvslog] avutil/eval: factor av_expr_free() calls out
Michael Niedermayer
git at videolan.org
Wed Apr 1 16:18:12 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 1 15:45:18 2015 +0200| [61123634dda06384980ea66289af1b378246b47d] | committer: Michael Niedermayer
avutil/eval: factor av_expr_free() calls out
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61123634dda06384980ea66289af1b378246b47d
---
libavutil/eval.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 5099e57..ea31856 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;
}
More information about the ffmpeg-cvslog
mailing list