Skip to content

Commit

Permalink
Merge branch 'feature/4004_jexl_expressions' into checkvalgrind-jexl-…
Browse files Browse the repository at this point in the history
…implementation
  • Loading branch information
fgalan committed May 27, 2024
2 parents 4a1396b + 9cdcb52 commit b5f1c86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/expressions/ExprManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ ExprResult ExprManager::evaluate(ExprContextObject* exprContextObjectP, const st
// The ExprResult::fill() method allocates dynamic memory. So, the callers to evaluate() are supposed to invoke ExprResult::release()
// method to free it
r.fill(result);

// cjexl_eval() allocated memory for us. We have to release it in order to avoid a leak
free((char*)result);

TIME_EXPR_JEXL_EVAL_STOP();
}

Expand Down

0 comments on commit b5f1c86

Please sign in to comment.