File: | meld3/cmeld3.c |
Function: | getiterator |
Error: | ob_refcnt of '*node' is 1 too high |
201 static PyObject*
202 getiterator(PyObject *node, PyObject *list) {
203 if (PyList_Append(list, node) == -1) {
when treating ob_size as 0
when PyList_Append() succeeds
taking False path
ob_refcnt is now refs: 1 + N where N >= 1
204 return NULL;
205 }
206 PyObject *children;
207 PyObject *child;
208
209 if (!(children = PyObject_GetAttr(node, PySTR_children))) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
210 return NULL;
211 }
212
213 int len, i;
214 len = PyList_Size(children);
when PyList_Size() returns ob_size
215 if (len < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
216 return NULL;
217 }
218
219 for (i = 0; i < len; i++) {
220 if (!(child = PyList_GetItem(children, i))) {
221 return NULL;
222 }
223 getiterator(child, list);
224 }
225
226 Py_DECREF(children);
227 return list;
228 }
ob_refcnt of '*node' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 7 similar trace(s) to this
File: | meld3/cmeld3.c |
Function: | getiterator |
Error: | ob_refcnt of '*children' is 1 too high |
201 static PyObject*
202 getiterator(PyObject *node, PyObject *list) {
203 if (PyList_Append(list, node) == -1) {
when treating ob_size as 0
when PyList_Append() succeeds
taking False path
204 return NULL;
205 }
206 PyObject *children;
207 PyObject *child;
208
209 if (!(children = PyObject_GetAttr(node, PySTR_children))) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
new ref from call to PyObject_GetAttr allocated at: if (!(children = PyObject_GetAttr(node, PySTR_children))) {
ob_refcnt is now refs: 1 + N where N >= 0
210 return NULL;
211 }
212
213 int len, i;
214 len = PyList_Size(children);
when PyList_Size() returns ob_size
215 if (len < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
216 return NULL;
217 }
218
219 for (i = 0; i < len; i++) {
220 if (!(child = PyList_GetItem(children, i))) {
221 return NULL;
222 }
223 getiterator(child, list);
224 }
225
226 Py_DECREF(children);
227 return list;
228 }
ob_refcnt of '*children' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
File: | meld3/cmeld3.c |
Function: | getiterator |
Error: | returning (PyObject*)NULL without setting an exception |
201 static PyObject*
202 getiterator(PyObject *node, PyObject *list) {
203 if (PyList_Append(list, node) == -1) {
when treating ob_size as 0
when PyList_Append() succeeds
taking False path
204 return NULL;
205 }
206 PyObject *children;
207 PyObject *child;
208
209 if (!(children = PyObject_GetAttr(node, PySTR_children))) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
210 return NULL;
211 }
212
213 int len, i;
214 len = PyList_Size(children);
when PyList_Size() returns ob_size
215 if (len < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
216 return NULL;
217 }
218
219 for (i = 0; i < len; i++) {
220 if (!(child = PyList_GetItem(children, i))) {
221 return NULL;
222 }
223 getiterator(child, list);
224 }
225
226 Py_DECREF(children);
227 return list;
228 }
returning (PyObject*)NULL without setting an exception
File: | meld3/cmeld3.c |
Function: | getiterator |
Error: | ob_refcnt of return value is 1 too low |
201 static PyObject*
202 getiterator(PyObject *node, PyObject *list) {
203 if (PyList_Append(list, node) == -1) {
when treating ob_size as 0
when PyList_Append() succeeds
taking False path
204 return NULL;
205 }
206 PyObject *children;
207 PyObject *child;
208
209 if (!(children = PyObject_GetAttr(node, PySTR_children))) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
210 return NULL;
211 }
212
213 int len, i;
214 len = PyList_Size(children);
when PyList_Size() returns ob_size
215 if (len < 0) {
when considering range: 0 <= value <= 0x7fffffff
taking False path
216 return NULL;
217 }
218
219 for (i = 0; i < len; i++) {
when considering len == (int)0 from meld3/cmeld3.c:214
taking False path
220 if (!(child = PyList_GetItem(children, i))) {
221 return NULL;
222 }
223 getiterator(child, list);
224 }
225
226 Py_DECREF(children);
when taking True path
227 return list;
228 }
ob_refcnt of return value is 1 too low
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: return value
but final ob_refcnt is N + 0
found 5 similar trace(s) to this
File: | meld3/cmeld3.c |
Function: | getiterator |
Error: | ob_refcnt of new ref from (unknown) getiterator is 1 too high |
201 static PyObject*
202 getiterator(PyObject *node, PyObject *list) {
203 if (PyList_Append(list, node) == -1) {
when treating ob_size as 0
when PyList_Append() succeeds
taking False path
204 return NULL;
205 }
206 PyObject *children;
207 PyObject *child;
208
209 if (!(children = PyObject_GetAttr(node, PySTR_children))) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
210 return NULL;
211 }
212
213 int len, i;
214 len = PyList_Size(children);
when PyList_Size() returns ob_size
215 if (len < 0) {
when considering range: 0 <= value <= 0x7fffffff
taking False path
216 return NULL;
217 }
218
219 for (i = 0; i < len; i++) {
when considering range: 1 <= len <= 0x7fffffff
taking True path
when considering len == (int)1 from meld3/cmeld3.c:214
taking False path
220 if (!(child = PyList_GetItem(children, i))) {
taking False path
221 return NULL;
222 }
223 getiterator(child, list);
when getiterator() succeeds
new ref from (unknown) getiterator allocated at: getiterator(child, list);
ob_refcnt is now refs: 1 + N where N >= 0
224 }
225
226 Py_DECREF(children);
when taking True path
227 return list;
228 }
ob_refcnt of new ref from (unknown) getiterator is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 1 similar trace(s) to this