Assert no memory leaks by stubbing malloc/free in the test suite

This commit is contained in:
Max Brunsfeld 2019-01-21 14:22:35 -08:00
parent 6105bf9909
commit 196339aaa9
7 changed files with 146 additions and 18 deletions

View file

@ -855,7 +855,7 @@ char *ts_subtree_string(Subtree self, const TSLanguage *language, bool include_a
language, true,
include_all, 0, false
) + 1;
char *result = ts_malloc(size * sizeof(char));
char *result = malloc(size * sizeof(char));
ts_subtree__write_to_string(self, result, size, language, true, include_all, 0, false);
return result;
}