9
0
Fork 0

lib: math: fix return path (numstack may be NULL)

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Lucas Stach 2014-02-07 09:48:47 +01:00 committed by Sascha Hauer
parent 13517cbcf0
commit efe314434f
1 changed files with 2 additions and 2 deletions

View File

@ -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 */