mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-10 21:58:48 +01:00
runFile: Free file source before exiting the function (#774)
This prevents a memleak, noticeable when running `wren_test` under `valgrind`. For example, the following command would leak `./bin/wren_test_d any_example.wren`
This commit is contained in:
@ -441,6 +441,7 @@
|
||||
WrenInterpretResult result = wrenInterpret(vm, module->chars, source);
|
||||
|
||||
pathFree(module);
|
||||
free(source);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user