File: | PAMmodule.c |
Function: | PyPAM_getenvlist |
Error: | dereferencing NULL (entry->ob_refcnt) at PAMmodule.c:462 |
443 static PyObject * PyPAM_getenvlist(PyObject *self, PyObject *args)
444 {
445 char **result, *cp;
446 PyObject *retval, *entry;
447 PyPAMObject *_self = (PyPAMObject *) self;
448
449 result = pam_getenvlist(_self->pamh);
450
451 if (result == NULL) {
452 Py_INCREF(Py_None);
when treating unknown char * * from PAMmodule.c:450 as non-NULL
taking False path
453 return Py_None;
454 }
455
456 retval = PyList_New(0);
457
when PyList_New() succeeds
458 while ((cp = *(result++)) != NULL) {
459 entry = Py_BuildValue("s", cp);
when treating unknown char * from PAMmodule.c:459 as non-NULL
taking True path
460 PyList_Append(retval, entry);
when Py_BuildValue() fails
461 Py_DECREF(entry);
returning -1 from PyList_Append() due to NULL item
462 }
dereferencing NULL (entry->ob_refcnt) at PAMmodule.c:462
463
464 return retval;
465 }
466
File: | PAMmodule.c |
Function: | PyPAM_getenvlist |
Error: | calling PyList_Append with NULL as argument 1 (retval) at PAMmodule.c:461 |
443 static PyObject * PyPAM_getenvlist(PyObject *self, PyObject *args)
444 {
445 char **result, *cp;
446 PyObject *retval, *entry;
447 PyPAMObject *_self = (PyPAMObject *) self;
448
449 result = pam_getenvlist(_self->pamh);
450
451 if (result == NULL) {
452 Py_INCREF(Py_None);
when treating unknown char * * from PAMmodule.c:450 as non-NULL
taking False path
453 return Py_None;
454 }
455
456 retval = PyList_New(0);
457
when PyList_New() fails
458 while ((cp = *(result++)) != NULL) {
459 entry = Py_BuildValue("s", cp);
when treating unknown char * from PAMmodule.c:459 as non-NULL
taking True path
460 PyList_Append(retval, entry);
when Py_BuildValue() succeeds
461 Py_DECREF(entry);
calling PyList_Append with NULL as argument 1 (retval) at PAMmodule.c:461
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
462 }
463
464 return retval;
465 }
466