diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-02-09 04:33:05 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-02-09 04:33:05 +0330 |
commit | 6a38b0247cff3be5ce2d0f725d559253357b4dc6 (patch) | |
tree | 1f305316cdc50fdb45c28eb0722effbb2491183f /src/runner | |
parent | de52585a1b2736a6a788ebc57000d7496f259e64 (diff) |
fix leaks
fix printError
Diffstat (limited to 'src/runner')
-rw-r--r-- | src/runner/runner.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runner/runner.c b/src/runner/runner.c index 606fe89..dde5307 100644 --- a/src/runner/runner.c +++ b/src/runner/runner.c @@ -69,7 +69,9 @@ AstTree *runAstTreeFunction(AstTreeFunction *function, AstTree **arguments, continue; case AST_TREE_TOKEN_VARIABLE_DEFINE: { AstTreeVariable *variable = expr.metadata; - variable->value = calcAstTreeValue(variable->value); + AstTree *value = calcAstTreeValue(variable->value); + astTreeDelete(variable->value); + variable->value = value; } continue; case AST_TREE_TOKEN_OPERATOR_SUM: |