File: snackmodule.c
Function: widgetListboxGetSel
Error: ob_refcnt of PyListObject is 1 too high
1086 static PyObject * widgetListboxGetSel(snackWidget * s, PyObject * args) {
1087     void ** selection;
1088     int numselected;
1089     int i;
1090     PyObject * sel;
1091 
1092     if (!PyArg_ParseTuple(args, ""))
1093         return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1094 
1095     selection = (void **) newtListboxGetSelection(s->co, &numselected);
1096 
1097     sel = PyList_New(0);
1098 
when PyList_New() succeeds
PyListObject allocated at:     sel = PyList_New(0);
ob_refcnt is now refs: 1 + N where N >= 0
1099     if (!selection) {
1100         return sel;
when treating unknown void * * from snackmodule.c:1096 as non-NULL
taking False path
1101     }
1102 
1103     sel = PyList_New(0);
1104     for (i = 0; i < numselected; i++) {
when PyList_New() succeeds
1105         PyList_Append(sel, PyInt_FromLong((long) selection[i]));
when taking True path
when taking False path
1106     }
when PyInt_FromLong() succeeds
when PyList_Append() succeeds
1107     free(selection);
1108 
1109     return sel;
1110 }
1111 
ob_refcnt of PyListObject 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 3 similar trace(s) to this

File: snackmodule.c
Function: widgetListboxGetSel
Error: ob_refcnt of PyIntObject is 1 too high
1086 static PyObject * widgetListboxGetSel(snackWidget * s, PyObject * args) {
1087     void ** selection;
1088     int numselected;
1089     int i;
1090     PyObject * sel;
1091 
1092     if (!PyArg_ParseTuple(args, ""))
1093         return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1094 
1095     selection = (void **) newtListboxGetSelection(s->co, &numselected);
1096 
1097     sel = PyList_New(0);
1098 
when PyList_New() succeeds
1099     if (!selection) {
1100         return sel;
when treating unknown void * * from snackmodule.c:1096 as non-NULL
taking False path
1101     }
1102 
1103     sel = PyList_New(0);
1104     for (i = 0; i < numselected; i++) {
when PyList_New() succeeds
1105         PyList_Append(sel, PyInt_FromLong((long) selection[i]));
when taking True path
when taking False path
1106     }
when PyInt_FromLong() succeeds
when PyList_Append() succeeds
PyIntObject allocated at:         PyList_Append(sel, PyInt_FromLong((long) selection[i]));
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 2 + N where N >= 0
PyIntObject is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
1107     free(selection);
1108 
1109     return sel;
1110 }
1111 
ob_refcnt of PyIntObject 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 3 similar trace(s) to this

File: snackmodule.c
Function: widgetListboxGetSel
Error: calling PyList_Append with NULL as argument 1 (sel) at snackmodule.c:1106
1086 static PyObject * widgetListboxGetSel(snackWidget * s, PyObject * args) {
1087     void ** selection;
1088     int numselected;
1089     int i;
1090     PyObject * sel;
1091 
1092     if (!PyArg_ParseTuple(args, ""))
1093         return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1094 
1095     selection = (void **) newtListboxGetSelection(s->co, &numselected);
1096 
1097     sel = PyList_New(0);
1098 
when PyList_New() succeeds
1099     if (!selection) {
1100         return sel;
when treating unknown void * * from snackmodule.c:1096 as non-NULL
taking False path
1101     }
1102 
1103     sel = PyList_New(0);
1104     for (i = 0; i < numselected; i++) {
when PyList_New() fails
1105         PyList_Append(sel, PyInt_FromLong((long) selection[i]));
when taking True path
1106     }
when PyInt_FromLong() succeeds
calling PyList_Append with NULL as argument 1 (sel) at snackmodule.c:1106
PyList_Append() invokes Py_TYPE() on the pointer via the PyList_Check() macro, thus accessing (NULL)->ob_type
found 3 similar trace(s) to this
1107     free(selection);
1108 
1109     return sel;
1110 }
1111 

File: snackmodule.c
Function: widgetListboxGetSel
Error: ob_refcnt of '*sel' is 1 too high
1086 static PyObject * widgetListboxGetSel(snackWidget * s, PyObject * args) {
1087     void ** selection;
1088     int numselected;
1089     int i;
1090     PyObject * sel;
1091 
1092     if (!PyArg_ParseTuple(args, ""))
1093         return NULL;
when PyArg_ParseTuple() succeeds
taking False path
1094 
1095     selection = (void **) newtListboxGetSelection(s->co, &numselected);
1096 
1097     sel = PyList_New(0);
1098 
when PyList_New() succeeds
PyListObject allocated at:     sel = PyList_New(0);
ob_refcnt is now refs: 1 + N where N >= 0
1099     if (!selection) {
1100         return sel;
when treating unknown void * * from snackmodule.c:1096 as non-NULL
taking False path
1101     }
1102 
1103     sel = PyList_New(0);
1104     for (i = 0; i < numselected; i++) {
when PyList_New() fails
1105         PyList_Append(sel, PyInt_FromLong((long) selection[i]));
when taking False path
1106     }
1107     free(selection);
1108 
1109     return sel;
1110 }
1111 
ob_refcnt of '*sel' is 1 too high was expecting final ob_refcnt to be N + 0 (for some unknown N) but final ob_refcnt is N + 1