aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/eval.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-01 15:45:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-01 15:59:58 +0200
commitc49e7924a8b537f2cda0da8627641fb97528fc11 (patch)
tree9a820876c06560697457be0e68bada5a2931aa2c /libavutil/eval.c
parent61123634dda06384980ea66289af1b378246b47d (diff)
downloadffmpeg-c49e7924a8b537f2cda0da8627641fb97528fc11.tar.gz
avutil/eval: check for av_malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r--libavutil/eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index ea318560de..1dfcbef7bb 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -692,6 +692,10 @@ int av_expr_parse(AVExpr **expr, const char *s,
goto end;
}
e->var= av_mallocz(sizeof(double) *VARS);
+ if (!e->var) {
+ ret = AVERROR(ENOMEM);
+ goto end;
+ }
*expr = e;
e = NULL;
end: