File: | python-virtkey.c |
Function: | virtkey_layout_get_sections |
Error: | ob_refcnt of PyStringObject is 1 too high |
635 static PyObject * virtkey_layout_get_sections(PyObject * self,PyObject *args)
636 {
637
638 XkbGeometryPtr geom;
639
640 int i;
641
642 virtkey * cvirt = (virtkey *)self;
643 geom = cvirt->kbd->geom;
644
when treating unknown struct _XkbDesc * from python-virtkey.c:644 as non-NULL
645 char * sectionString;
646
647 PyObject * sectionTuple = PyTuple_New(geom->num_sections);
648
when treating unknown struct _XkbGeometry * from python-virtkey.c:644 as non-NULL
when PyTuple_New() succeeds
649 for (i = 0; i < geom->num_sections; ++i)
650 {
when considering range: 1 <= value <= 65535
taking True path
when considering range: 0 <= value <= 1
taking False path
651 XkbSectionPtr section = &geom->sections[i];
652 sectionString = XGetAtomName (cvirt->display, section->name);
653 PyTuple_SetItem(sectionTuple, i, PyString_FromString(sectionString));
when treating unknown struct _XkbSection * from python-virtkey.c:652 as non-NULL
654 free(sectionString);
when treating unknown char * from python-virtkey.c:653 as non-NULL
when PyString_FromString() succeeds
when considering value == (short unsigned int)0 from python-virtkey.c:648
when PyTuple_SetItem() fails (index out of range)
PyStringObject allocated at: PyTuple_SetItem(sectionTuple, i, PyString_FromString(sectionString));
ob_refcnt is now refs: 1 + N where N >= 0
655 }
656
657 return sectionTuple;
658 }
returning
ob_refcnt of PyStringObject is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
659
File: | python-virtkey.c |
Function: | virtkey_layout_get_sections |
Error: | calling PyTuple_SetItem with NULL as argument 1 (sectionTuple) at python-virtkey.c:654 |
635 static PyObject * virtkey_layout_get_sections(PyObject * self,PyObject *args)
636 {
637
638 XkbGeometryPtr geom;
639
640 int i;
641
642 virtkey * cvirt = (virtkey *)self;
643 geom = cvirt->kbd->geom;
644
when treating unknown struct _XkbDesc * from python-virtkey.c:644 as non-NULL
645 char * sectionString;
646
647 PyObject * sectionTuple = PyTuple_New(geom->num_sections);
648
when treating unknown struct _XkbGeometry * from python-virtkey.c:644 as non-NULL
when PyTuple_New() fails
649 for (i = 0; i < geom->num_sections; ++i)
650 {
when considering range: 1 <= value <= 65535
taking True path
651 XkbSectionPtr section = &geom->sections[i];
652 sectionString = XGetAtomName (cvirt->display, section->name);
653 PyTuple_SetItem(sectionTuple, i, PyString_FromString(sectionString));
when treating unknown struct _XkbSection * from python-virtkey.c:652 as non-NULL
654 free(sectionString);
when treating unknown char * from python-virtkey.c:653 as non-NULL
when PyString_FromString() succeeds
calling PyTuple_SetItem with NULL as argument 1 (sectionTuple) at python-virtkey.c:654
PyTuple_SetItem() invokes Py_TYPE() on the pointer via the PyTuple_Check() macro, thus accessing (NULL)->ob_type
found 1 similar trace(s) to this
655 }
656
657 return sectionTuple;
658 }
659