commit beb6b21ea6b0c6a2c33894f5e4664abebb619c2b parent b961628a7766a4c1d1e182ded1d243217ecd7a01 Author: NunoSempere <nuno.sempere@protonmail.com> Date: Tue, 2 May 2023 21:04:58 -0400 feat: squash another memory leak? Diffstat:
| M | mumble | | | 0 | |
| M | src/mumble.c | | | 6 | +++++- |
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/mumble b/mumble Binary files differ. diff --git a/src/mumble.c b/src/mumble.c @@ -816,7 +816,11 @@ lispval* evaluate_lispval(lispval* l, lispenv* env) printfln("Checking if this is a symbol"); if (l->type == LISPVAL_SYM) { // Unclear how I want to structure this so as to not get memory errors. - return get_from_lispenv(l->sym, env); + lispval* answer = get_from_lispenv(l->sym, env); + delete_lispval(l); + // fixes memory bug! I guess that if I just return get_from_lispenv, + // then it gets lost along the way? Not sure. + return answer; } // Evaluate the children if needed