116 static PyObject *
117 HunSpell_stem(HunSpell * self, PyObject *args)
118 {
119 char *word, **slist;
120 int i, num_slist;
121 PyObject *slist_list;
122
123 if (!PyArg_ParseTuple(args, "s", &word))
when PyArg_ParseTuple() succeeds
taking False path
124 return NULL;
125
126 slist_list = PyList_New(0);
when PyList_New() succeeds
127 num_slist = Hunspell_stem(self->handle, &slist, word);
128
129 for (i = 0; i < num_slist; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
when considering value == (int)1 from hunspell.c:127
taking False path
130 PyList_Append(slist_list, Py_BuildValue("s", slist[i]));
when treating unknown char * * from hunspell.c:130 as non-NULL
when Py_BuildValue() succeeds
when PyList_Append() succeeds
new ref from call to Py_BuildValue allocated at: PyList_Append(slist_list, Py_BuildValue("s", slist[i]));
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 2 + N where N >= 0
new ref from call to Py_BuildValue is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
131 }
132
133 Hunspell_free_list(self->handle, &slist, num_slist);
134 return slist_list;
135 }
ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: PyListObject.ob_item[0]
but final ob_refcnt is N + 2
found 1 similar trace(s) to this