summaryrefslogtreecommitdiff
path: root/compiler.c
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-03-06 05:09:58 -0500
committerKyle Gunger <kgunger12@gmail.com>2024-03-06 05:09:58 -0500
commitb0835a8f23d0fd100ecee28ded3bd621b889a634 (patch)
treed2d495934f4c029def0fa962c4bc36003359fc86 /compiler.c
parentb3a5cd620605eee22a97565d7ce9a2101f32f042 (diff)
fix small leak
Diffstat (limited to 'compiler.c')
-rw-r--r--compiler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler.c b/compiler.c
index 2d6288e..b2ddcf9 100644
--- a/compiler.c
+++ b/compiler.c
@@ -3968,7 +3968,9 @@ Variable _eval_dot(Scope *s, CompData *data, Vector *tokens, size_t start, size_
Artifact name = art_from_str(t->data, '.');
if (start == end - 1) {
- return scope_get_var(s, &name);
+ Variable v = scope_get_var(s, &name);
+ art_end(&name);
+ return v;
}
Variable v = {0};
@@ -4609,7 +4611,7 @@ void eval_strict(CompData *out, Vector *tokens, Variable *v, size_t start) {
char *datalab = _var_get_datalabel(v);
Vector store = vect_from_string(datalab);
vect_push_string(&store, ":\n");
- size_t ntharr = 0;
+ int ntharr = 0;
Token *cur = vect_get(tokens, start + 1);