From efe314434ff54542b6939b52b86c01e820add044 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 7 Feb 2014 09:48:47 +0100 Subject: lib: math: fix return path (numstack may be NULL) Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- lib/math.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/math.c b/lib/math.c index a4731edb9a..2e53b09e6c 100644 --- a/lib/math.c +++ b/lib/math.c @@ -546,8 +546,8 @@ static arith_t evaluate_string(arith_state_t *math_state, const char *expr) arith_t result; if (numstack == NULL || stack == NULL) { - errmsg = "out of memory"; - goto err_with_custom_msg; + math_state->errmsg = "out of memory"; + return -1; } /* Start with a left paren */ -- cgit v1.2.3