From 8be40ec14e2a3dc85063d5fa7a807e35b8fb06d6 Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Thu, 9 Jul 2020 20:54:21 +0200 Subject: [PATCH] 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` --- test/test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test.c b/test/test.c index 1cbff36e..624bbf4f 100644 --- a/test/test.c +++ b/test/test.c @@ -441,6 +441,7 @@ WrenInterpretResult result = wrenInterpret(vm, module->chars, source); pathFree(module); + free(source); return result; }