fix: ts_subtree_string not using ts_malloc

This commit is contained in:
ikrima 2020-10-15 20:21:33 -07:00
parent 8bb8e9b8b3
commit 50ff4376b4

View file

@ -902,7 +902,7 @@ char *ts_subtree_string(
language, include_all,
0, false, ROOT_FIELD
) + 1;
char *result = malloc(size * sizeof(char));
char *result = ts_malloc(size * sizeof(char));
ts_subtree__write_to_string(
self, result, size,
language, include_all,