Fix memory leaks
This commit is contained in:
parent
9bc7d51074
commit
12331d66f5
7 changed files with 24 additions and 14 deletions
|
|
@ -13,6 +13,10 @@ ts_document * ts_document_make() {
|
|||
}
|
||||
|
||||
void ts_document_free(ts_document *document) {
|
||||
if (document->parser.free_fn)
|
||||
document->parser.free_fn(document->parser.data);
|
||||
if (document->input.release_fn)
|
||||
document->input.release_fn(document->input.data);
|
||||
free(document);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue