File: bitarray/_bitarray.c
Function: bitarray_decode
Error: ob_refcnt of '*symbol' is 1 too high
1842 static PyObject *
1843 bitarray_decode(bitarrayobject *self, PyObject *tree)
1844 {
1845     PyObject *iter = NULL, *symbol, *res;
1846 
1847     iter = PyObject_GetIter((PyObject *) self);
when PyObject_GetIter() succeeds
1848     if (iter == NULL)
taking False path
1849         goto error;
1850 
1851     /* traverse binary tree and append symbols to the result list */
1852     res = PyList_New(0);
when PyList_New() succeeds
1853     while ((symbol = btree_traverse(iter, tree)) != NULL) {
when btree_traverse() succeeds
taking True path
when btree_traverse() fails
taking False path
new ref from (unknown) btree_traverse allocated at:     while ((symbol = btree_traverse(iter, tree)) != NULL) {
ob_refcnt is now refs: 1 + N where N >= 0
1854         if (IS_EMPTY_LIST(symbol)) {
when considering value == (long int)0 from bitarray/_bitarray.c:1854
taking False path
1855             PyErr_SetString(PyExc_ValueError,
1856                             "prefix code does not match data in bitarray");
1857             Py_DECREF(res);
1858             goto error;
1859         }
1860         if (PyList_Append(res, symbol) < 0)
when PyList_Append() succeeds
taking False path
ob_refcnt is now refs: 2 + N where N >= 0
'*symbol' is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
1861             goto error;
1862     }
1863     Py_XDECREF(iter);
taking False path
when taking True path
1864     return res;
1865 error:
1866     Py_XDECREF(iter);
1867     return NULL;
1868 }
ob_refcnt of '*symbol' 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 15 similar trace(s) to this

File: bitarray/_bitarray.c
Function: bitarray_decode
Error: ob_refcnt of '*res' is 1 too high
1842 static PyObject *
1843 bitarray_decode(bitarrayobject *self, PyObject *tree)
1844 {
1845     PyObject *iter = NULL, *symbol, *res;
1846 
1847     iter = PyObject_GetIter((PyObject *) self);
when PyObject_GetIter() succeeds
1848     if (iter == NULL)
taking False path
1849         goto error;
1850 
1851     /* traverse binary tree and append symbols to the result list */
1852     res = PyList_New(0);
when PyList_New() succeeds
PyListObject allocated at:     res = PyList_New(0);
ob_refcnt is now refs: 1 + N where N >= 0
1853     while ((symbol = btree_traverse(iter, tree)) != NULL) {
when btree_traverse() succeeds
taking True path
1854         if (IS_EMPTY_LIST(symbol)) {
when considering value == (long int)0 from bitarray/_bitarray.c:1854
taking False path
1855             PyErr_SetString(PyExc_ValueError,
1856                             "prefix code does not match data in bitarray");
1857             Py_DECREF(res);
1858             goto error;
1859         }
1860         if (PyList_Append(res, symbol) < 0)
when PyList_Append() fails
taking True path
1861             goto error;
1862     }
1863     Py_XDECREF(iter);
1864     return res;
1865 error:
1866     Py_XDECREF(iter);
taking False path
when taking True path
1867     return NULL;
1868 }
ob_refcnt of '*res' 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 5 similar trace(s) to this

File: bitarray/_bitarray.c
Function: bitarray_decode
Error: calling PyList_Append with NULL as argument 1 (res) at bitarray/_bitarray.c:1860
1842 static PyObject *
1843 bitarray_decode(bitarrayobject *self, PyObject *tree)
1844 {
1845     PyObject *iter = NULL, *symbol, *res;
1846 
1847     iter = PyObject_GetIter((PyObject *) self);
when PyObject_GetIter() succeeds
1848     if (iter == NULL)
taking False path
1849         goto error;
1850 
1851     /* traverse binary tree and append symbols to the result list */
1852     res = PyList_New(0);
when PyList_New() fails
1853     while ((symbol = btree_traverse(iter, tree)) != NULL) {
when btree_traverse() succeeds
taking True path
1854         if (IS_EMPTY_LIST(symbol)) {
when considering value == (long int)0 from bitarray/_bitarray.c:1854
taking False path
1855             PyErr_SetString(PyExc_ValueError,
1856                             "prefix code does not match data in bitarray");
1857             Py_DECREF(res);
1858             goto error;
1859         }
1860         if (PyList_Append(res, symbol) < 0)
calling PyList_Append with NULL as argument 1 (res) at bitarray/_bitarray.c:1860
PyList_Append() invokes Py_TYPE() on the pointer via the PyList_Check() macro, thus accessing (NULL)->ob_type
found 2 similar trace(s) to this
1861             goto error;
1862     }
1863     Py_XDECREF(iter);
1864     return res;
1865 error:
1866     Py_XDECREF(iter);
1867     return NULL;
1868 }

File: bitarray/_bitarray.c
Function: bitarray_decode
Error: dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1857
1842 static PyObject *
1843 bitarray_decode(bitarrayobject *self, PyObject *tree)
1844 {
1845     PyObject *iter = NULL, *symbol, *res;
1846 
1847     iter = PyObject_GetIter((PyObject *) self);
when PyObject_GetIter() succeeds
1848     if (iter == NULL)
taking False path
1849         goto error;
1850 
1851     /* traverse binary tree and append symbols to the result list */
1852     res = PyList_New(0);
when PyList_New() fails
1853     while ((symbol = btree_traverse(iter, tree)) != NULL) {
when btree_traverse() succeeds
taking True path
1854         if (IS_EMPTY_LIST(symbol)) {
when considering range: 1 <= value <= 0x2000000
taking True path
when PyList_Size() returns ob_size
when considering value == (Py_ssize_t)0 from bitarray/_bitarray.c:1854
taking True path
1855             PyErr_SetString(PyExc_ValueError,
calling PyErr_SetString()
1856                             "prefix code does not match data in bitarray");
1857             Py_DECREF(res);
dereferencing NULL (res->ob_refcnt) at bitarray/_bitarray.c:1857
1858             goto error;
1859         }
1860         if (PyList_Append(res, symbol) < 0)
1861             goto error;
1862     }
1863     Py_XDECREF(iter);
1864     return res;
1865 error:
1866     Py_XDECREF(iter);
1867     return NULL;
1868 }