File: python-virtkey.c
Function: virtkey_layout_get_section_info
Error: ob_refcnt of PyIntObject is 1 too high
539 static PyObject * 
540 virtkey_layout_get_section_info(PyObject * self,PyObject *args)
541 {
542     char * requestedSection;
543     if (PyArg_ParseTuple(args, "s", &requestedSection)){
when PyArg_ParseTuple() succeeds
taking True path
544       
545         XkbGeometryPtr geom;
546         virtkey * cvirt  = (virtkey *)self;
547 
548         char * sectionString;
549 
550         PyObject * returnTuple;
551 
552         int i;
553 
554         geom = cvirt->kbd->geom;
when treating unknown struct _XkbDesc * from python-virtkey.c:554 as non-NULL
555 
556 
557         for (i = 0; i < geom->num_sections; ++i) 
when treating unknown struct _XkbGeometry * from python-virtkey.c:554 as non-NULL
when considering value == (short unsigned int)0 from python-virtkey.c:557
taking False path
558         {
559             XkbSectionPtr section = &geom->sections[i];
560             sectionString = XGetAtomName (cvirt->display, section->name);
561             if (!strcmp(sectionString,requestedSection))
562             {
563                 PyObject *  width = PyInt_FromLong(section->width/10);
564                 PyObject *  height = PyInt_FromLong(section->height/10);
565                 
566                 
567                 //Increfs width, height
568                 returnTuple = PyTuple_Pack(2,
569                                        width,
570                                        height);
571                 
572                 Py_DECREF(width);
573                 Py_DECREF(height);
574 
575                 free(sectionString);
576                 return returnTuple;
577             }
578             free(sectionString);
579         }
580     }
581     return PyTuple_Pack(2,PyInt_FromLong(0),PyInt_FromLong(0));
when PyInt_FromLong() succeeds
when PyInt_FromLong() succeeds
when PyTuple_Pack() succeeds
PyIntObject allocated at:     return PyTuple_Pack(2,PyInt_FromLong(0),PyInt_FromLong(0));
ob_refcnt is now refs: 1 + N where N >= 0
582 }
ob_refcnt of PyIntObject 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 15 similar trace(s) to this

File: python-virtkey.c
Function: virtkey_layout_get_section_info
Error: calling PyTuple_Pack with NULL as argument 3 (height) at python-virtkey.c:568
539 static PyObject * 
540 virtkey_layout_get_section_info(PyObject * self,PyObject *args)
541 {
542     char * requestedSection;
543     if (PyArg_ParseTuple(args, "s", &requestedSection)){
when PyArg_ParseTuple() succeeds
taking True path
544       
545         XkbGeometryPtr geom;
546         virtkey * cvirt  = (virtkey *)self;
547 
548         char * sectionString;
549 
550         PyObject * returnTuple;
551 
552         int i;
553 
554         geom = cvirt->kbd->geom;
when treating unknown struct _XkbDesc * from python-virtkey.c:554 as non-NULL
555 
556 
557         for (i = 0; i < geom->num_sections; ++i) 
when treating unknown struct _XkbGeometry * from python-virtkey.c:554 as non-NULL
when considering range: 1 <= value <= 65535
taking True path
558         {
559             XkbSectionPtr section = &geom->sections[i];
560             sectionString = XGetAtomName (cvirt->display, section->name);
when treating unknown struct _XkbSection * from python-virtkey.c:559 as non-NULL
561             if (!strcmp(sectionString,requestedSection))
when considering value == (int)0 from python-virtkey.c:561
taking True path
562             {
563                 PyObject *  width = PyInt_FromLong(section->width/10);
when PyInt_FromLong() succeeds
564                 PyObject *  height = PyInt_FromLong(section->height/10);
when PyInt_FromLong() fails
565                 
566                 
567                 //Increfs width, height
568                 returnTuple = PyTuple_Pack(2,
calling PyTuple_Pack with NULL as argument 3 (height) at python-virtkey.c:568
PyTuple_Pack() invokes Py_INCREF() on the pointer, thus accessing (NULL)->ob_refcnt
569                                        width,
570                                        height);
571                 
572                 Py_DECREF(width);
573                 Py_DECREF(height);
574 
575                 free(sectionString);
576                 return returnTuple;
577             }
578             free(sectionString);
579         }
580     }
581     return PyTuple_Pack(2,PyInt_FromLong(0),PyInt_FromLong(0));
582 }

File: python-virtkey.c
Function: virtkey_layout_get_section_info
Error: calling PyTuple_Pack with NULL as argument 2 (width) at python-virtkey.c:568
539 static PyObject * 
540 virtkey_layout_get_section_info(PyObject * self,PyObject *args)
541 {
542     char * requestedSection;
543     if (PyArg_ParseTuple(args, "s", &requestedSection)){
when PyArg_ParseTuple() succeeds
taking True path
544       
545         XkbGeometryPtr geom;
546         virtkey * cvirt  = (virtkey *)self;
547 
548         char * sectionString;
549 
550         PyObject * returnTuple;
551 
552         int i;
553 
554         geom = cvirt->kbd->geom;
when treating unknown struct _XkbDesc * from python-virtkey.c:554 as non-NULL
555 
556 
557         for (i = 0; i < geom->num_sections; ++i) 
when treating unknown struct _XkbGeometry * from python-virtkey.c:554 as non-NULL
when considering range: 1 <= value <= 65535
taking True path
558         {
559             XkbSectionPtr section = &geom->sections[i];
560             sectionString = XGetAtomName (cvirt->display, section->name);
when treating unknown struct _XkbSection * from python-virtkey.c:559 as non-NULL
561             if (!strcmp(sectionString,requestedSection))
when considering value == (int)0 from python-virtkey.c:561
taking True path
562             {
563                 PyObject *  width = PyInt_FromLong(section->width/10);
when PyInt_FromLong() fails
564                 PyObject *  height = PyInt_FromLong(section->height/10);
when PyInt_FromLong() succeeds
565                 
566                 
567                 //Increfs width, height
568                 returnTuple = PyTuple_Pack(2,
calling PyTuple_Pack with NULL as argument 2 (width) at python-virtkey.c:568
PyTuple_Pack() invokes Py_INCREF() on the pointer, thus accessing (NULL)->ob_refcnt
found 1 similar trace(s) to this
569                                        width,
570                                        height);
571                 
572                 Py_DECREF(width);
573                 Py_DECREF(height);
574 
575                 free(sectionString);
576                 return returnTuple;
577             }
578             free(sectionString);
579         }
580     }
581     return PyTuple_Pack(2,PyInt_FromLong(0),PyInt_FromLong(0));
582 }