From 517985473ac9027dac962d933127e6b678f8d8a7 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Tue, 23 Apr 2019 02:55:08 +0000 Subject: [PATCH] FS-11785 [mod_expr] fix scan-build false positives --- src/mod/applications/mod_expr/exprpars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_expr/exprpars.c b/src/mod/applications/mod_expr/exprpars.c index 25e66b8e32..10396ff244 100644 --- a/src/mod/applications/mod_expr/exprpars.c +++ b/src/mod/applications/mod_expr/exprpars.c @@ -1266,7 +1266,7 @@ int exprInternalParseFunction(exprObj * obj, exprNode * node, exprToken * tokens } /* Set reference item */ - reftmp[refcur] = addr; + if (reftmp) reftmp[refcur] = addr; // the 'if' shuts up scan-build /* increase ref arg number and lv position */ refcur++; @@ -1330,7 +1330,7 @@ int exprInternalParseFunction(exprObj * obj, exprNode * node, exprToken * tokens } /* Set reference item */ - reftmp[refcur] = addr; + if (reftmp) reftmp[refcur] = addr; // the 'if' shuts up scan-build } else { err = exprInternalParse(obj, &(tmp[cur]), tokens, lv, p2 - 1); if (err != EXPR_ERROR_NOERROR)