mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Plugged memory leaks in the test
This commit is contained in:
@@ -99,6 +99,7 @@ int main() {
|
|||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
char* source = readFile("../scripts//test/call-from-host.toy", &size);
|
char* source = readFile("../scripts//test/call-from-host.toy", &size);
|
||||||
unsigned char* tb = compileString(source, &size);
|
unsigned char* tb = compileString(source, &size);
|
||||||
|
free((void*)source);
|
||||||
|
|
||||||
if (!tb) {
|
if (!tb) {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -272,6 +273,8 @@ int main() {
|
|||||||
freeLiteralArray(&arguments);
|
freeLiteralArray(&arguments);
|
||||||
freeLiteralArray(&returns);
|
freeLiteralArray(&returns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
freeLiteral(counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
//test assertion failure
|
//test assertion failure
|
||||||
|
|||||||
Reference in New Issue
Block a user