diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-03-06 05:09:58 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-03-06 05:09:58 -0500 |
commit | b0835a8f23d0fd100ecee28ded3bd621b889a634 (patch) | |
tree | d2d495934f4c029def0fa962c4bc36003359fc86 /compiler.c | |
parent | b3a5cd620605eee22a97565d7ce9a2101f32f042 (diff) |
fix small leak
Diffstat (limited to 'compiler.c')
-rw-r--r-- | compiler.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |