File: python-virtkey.c
Function: virtkey_get_layouts
Error: dereferencing NULL (MEM[(struct PyTupleObject *)tuple].ob_item) at python-virtkey.c:829
810 static PyObject * virtkey_get_layouts(PyObject * self, PyObject *args)
811 {
812 	int inout = 20;
813     int i=0;
814 
815 	virtkey * cvirt = (virtkey *)self;
816 
817 	XkbComponentNamesRec names;
818 	XkbComponentNamesPtr namesPtr = &names;
819 	
820 	namesPtr->keymap = "*";
821 
822 
823 	XkbComponentListPtr components = XkbListComponents(cvirt->display,
824                                                 XkbUseCoreKbd,namesPtr,&inout);
825 
826     PyObject *tuple = PyTuple_New(components->num_keymaps);
827 
when treating unknown struct _XkbComponentList * from python-virtkey.c:824 as non-NULL
when PyTuple_New() fails
828     for(; i<components->num_keymaps; i++){
829         char *name = strdup(components->keymaps[i].name);
when considering range: 1 <= value <= 0x7fffffff
taking True path
830 
when treating unknown struct _XkbComponentName * from python-virtkey.c:830 as non-NULL
831         //no error checking version of set_item because tuple is empty.
832         PyTuple_SET_ITEM(tuple, i, PyString_FromString(name));
833     }
when treating unknown char * from python-virtkey.c:830 as non-NULL
when PyString_FromString() succeeds
dereferencing NULL (MEM[(struct PyTupleObject *)tuple].ob_item) at python-virtkey.c:829
found 1 similar trace(s) to this
834 
835     XkbFreeComponentList(components);
836 
837 	return tuple;
838 }
839