132 static PyObject * hdrKeyList(hdrObject * s)
133 {
134 PyObject * keys = PyList_New(0);
when PyList_New() succeeds
135 HeaderIterator hi = headerInitIterator(s->h);
136 rpmTagVal tag;
137
138 while ((tag = headerNextTag(hi)) != RPMTAG_NOT_FOUND) {
when taking True path
139 PyObject *to = PyInt_FromLong(tag);
when PyInt_FromLong() fails
140 PyList_Append(keys, to);
returning -1 from PyList_Append() due to NULL item
141 Py_DECREF(to);
dereferencing NULL (to->ob_refcnt) at header-py.c:142
142 }
143 headerFreeIterator(hi);
144
145 return keys;
146 }
147
132 static PyObject * hdrKeyList(hdrObject * s)
133 {
134 PyObject * keys = PyList_New(0);
when PyList_New() fails
135 HeaderIterator hi = headerInitIterator(s->h);
136 rpmTagVal tag;
137
138 while ((tag = headerNextTag(hi)) != RPMTAG_NOT_FOUND) {
when taking True path
139 PyObject *to = PyInt_FromLong(tag);
when PyInt_FromLong() succeeds
140 PyList_Append(keys, to);
calling PyList_Append with NULL (gcc.VarDecl('keys')) as argument 1 at header-py.c:141
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
141 Py_DECREF(to);
142 }
143 headerFreeIterator(hi);
144
145 return keys;
146 }
147