1
0
forked from GitHub/gf-core

no more space leaks

This commit is contained in:
krangelov
2021-09-28 11:13:45 +02:00
parent 67f83ebf8a
commit fcad8dd3e2
3 changed files with 62 additions and 16 deletions

View File

@@ -150,6 +150,12 @@ PGF_categoryContext(PGFObject *self, PyObject *args)
PyObject *contexts = PyList_FromHypos(hypos, n_hypos);
for (size_t i = 0; i < n_hypos; i++) {
free(hypos[i].cid);
Py_DECREF((PyObject *)hypos[i].type);
}
free(hypos);
return contexts;
}