fix space leak in PySequence_AsHypos. PyList_FromHypos->PyTuple_FromHypos

This commit is contained in:
krangelov
2021-10-16 21:12:16 +02:00
parent 0eb6e9f724
commit 0e98c30973
5 changed files with 28 additions and 40 deletions

View File

@@ -148,7 +148,7 @@ PGF_categoryContext(PGFObject *self, PyObject *args)
Py_RETURN_NONE;
}
PyObject *contexts = PyList_FromHypos(hypos, n_hypos);
PyObject *contexts = PyTuple_FromHypos(hypos, n_hypos);
for (size_t i = 0; i < n_hypos; i++) {
free(hypos[i].cid);