File: src/lib/fm-pyfontutils.c
Function: FcFileList
Error: ob_refcnt of PyStringObject is 1 too high
133 static PyObject *
134 FcFileList(PyObject *self, PyObject *args)
135 {
136     GSList      *iter = NULL,
137                 *filelist = NULL;
138     PyObject    *fontlist = PyList_New(0);
when PyList_New() succeeds
139 
140     filelist = FcListFiles(FALSE);
141 
142     for (iter = filelist; iter; iter = iter->next)
when treating unknown struct GSList * from src/lib/fm-pyfontutils.c:140 as non-NULL
taking True path
when treating unknown struct GSList * from src/lib/fm-pyfontutils.c:142 as NULL
taking False path
143         PyList_Append(fontlist, PyString_FromString(iter->data));
when treating unknown void * from src/lib/fm-pyfontutils.c:143 as non-NULL
when PyString_FromString() succeeds
when PyList_Append() succeeds
PyStringObject allocated at:         PyList_Append(fontlist, PyString_FromString(iter->data));
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 2 + N where N >= 0
PyStringObject is now referenced by 1 non-stack value(s): PyListObject.ob_item[0]
144 
145     g_slist_foreach(filelist, (GFunc) g_free_and_nullify, NULL);
146     g_slist_free(filelist);
147     g_slist_free(iter);
148 
149     return fontlist;
returning
ob_refcnt of PyStringObject 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
150 }

File: src/lib/fm-pyfontutils.c
Function: FcFileList
Error: calling PyList_Append with NULL as argument 1 (fontlist) at src/lib/fm-pyfontutils.c:143
133 static PyObject *
134 FcFileList(PyObject *self, PyObject *args)
135 {
136     GSList      *iter = NULL,
137                 *filelist = NULL;
138     PyObject    *fontlist = PyList_New(0);
when PyList_New() fails
139 
140     filelist = FcListFiles(FALSE);
141 
142     for (iter = filelist; iter; iter = iter->next)
when treating unknown struct GSList * from src/lib/fm-pyfontutils.c:140 as non-NULL
taking True path
143         PyList_Append(fontlist, PyString_FromString(iter->data));
when treating unknown void * from src/lib/fm-pyfontutils.c:143 as non-NULL
when PyString_FromString() succeeds
calling PyList_Append with NULL as argument 1 (fontlist) at src/lib/fm-pyfontutils.c:143
PyList_Append() invokes Py_TYPE() on the pointer via the PyList_Check() macro, thus accessing (NULL)->ob_type
found 1 similar trace(s) to this
144 
145     g_slist_foreach(filelist, (GFunc) g_free_and_nullify, NULL);
146     g_slist_free(filelist);
147     g_slist_free(iter);
148 
149     return fontlist;
150 }