137 static PyObject *
138 HunSpell_generate(HunSpell * self, PyObject *args)
139 {
140 char *word1, *word2, **slist;
141 int i, num_slist;
142 PyObject *slist_list;
143
144 if (!PyArg_ParseTuple(args, "ss", &word1, &word2))
when PyArg_ParseTuple() succeeds
taking False path
145 return NULL;
146
147 slist_list = PyList_New(0);
when PyList_New() succeeds
148 num_slist = Hunspell_generate(self->handle, &slist, word1, word2);
149
150 for (i = 0; i < num_slist; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
when considering value == (int)1 from hunspell.c:148
taking False path
151 PyList_Append(slist_list, Py_BuildValue("s", slist[i]));
when treating unknown char * * from hunspell.c:151 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]
152 }
153
154 Hunspell_free_list(self->handle, &slist, num_slist);
155 return slist_list;
156 }
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