From 50cc5ca270fc6a53b0dee3294c148cc688fc0421 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 1 Oct 2022 23:00:16 +1000 Subject: [PATCH] Plugged memory leaks in the test --- test/test_call_from_host.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_call_from_host.c b/test/test_call_from_host.c index 558016a..2b2c6ee 100644 --- a/test/test_call_from_host.c +++ b/test/test_call_from_host.c @@ -99,6 +99,7 @@ int main() { size_t size = 0; char* source = readFile("../scripts//test/call-from-host.toy", &size); unsigned char* tb = compileString(source, &size); + free((void*)source); if (!tb) { return -1; @@ -272,6 +273,8 @@ int main() { freeLiteralArray(&arguments); freeLiteralArray(&returns); } + + freeLiteral(counter); } //test assertion failure