Skip to content

Commit

Permalink
FIX basic replacement logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed May 27, 2024
1 parent da9c9b5 commit 826ffdd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/expressions/ExprManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ ExprResult ExprManager::evaluate(ExprContextObject* exprContextObjectP, const st
// method to free it
r.fill(result);

#ifndef EXPR_BASIC
// cjexl_eval() allocated memory for us. We have to release it in order to avoid a leak
// (disbled with EXPR_BASIC because in that case result is static memory)
free((char*)result);
#endif

TIME_EXPR_JEXL_EVAL_STOP();
}
Expand Down

0 comments on commit 826ffdd

Please sign in to comment.