diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-05-15 01:37:42 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-05-15 01:47:13 +0330 |
commit | 512453533f52c9a318011768297d9ecfdbc02a59 (patch) | |
tree | cb7a8b28540358bcacd1de0acfe512ede1ca6256 /src/runner/runner.c | |
parent | b6a27a2fcc02641801b4193d0f068608e18dbcbd (diff) |
fix double free and memory leaks
Diffstat (limited to 'src/runner/runner.c')
-rw-r--r-- | src/runner/runner.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c index 3ddeb85..f144693 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -1575,7 +1575,8 @@ AstTree *runExpression(AstTree *expr, AstTreeScope *scope, bool *shouldRet, AstTreeFunction *function = shapeShifter->generateds.functions[metadata->index]; - return newAstTree(AST_TREE_TOKEN_FUNCTION, function, + return newAstTree(AST_TREE_TOKEN_FUNCTION, + copyAstTreeFunction(function, NULL, NULL, 0, false), copyAstTree(expr->type), expr->str_begin, expr->str_end); } case AST_TREE_TOKEN_NONE: |