File: alsaaudio.c
Function: alsamixer_getrec
Error: dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1696
1662 static PyObject *
1663 alsamixer_getrec(alsamixer_t *self, PyObject *args) 
1664 {
1665     snd_mixer_elem_t *elem;
1666     int i;
1667     int ival;
1668     PyObject *result;
1669     PyObject *item;
1670 
1671     if (!PyArg_ParseTuple(args,":getrec")) 
when PyArg_ParseTuple() succeeds
taking False path
1672         return NULL;
1673     
1674     if (!self->handle) 
when treating unknown struct snd_mixer_t * from alsaaudio.c:1674 as non-NULL
taking False path
1675     {
1676         PyErr_SetString(ALSAAudioError, "Mixer is closed");
1677         return NULL;
1678     }
1679 
1680     elem = alsamixer_find_elem(self->handle,self->controlname,self->controlid);
1681     if (!snd_mixer_selem_has_capture_switch(elem)) 
when considering range: -0x80000000 <= value <= -1
taking False path
1682     {
1683         PyErr_SetString(ALSAAudioError,"Mixer has no record switch");
1684         return NULL;
1685     }    
1686 
1687     result = PyList_New(0);
when PyList_New() succeeds
1688 
1689     for (i = 0; i <= SND_MIXER_SCHN_LAST; i++) 
taking True path
1690     {
1691         if (snd_mixer_selem_has_capture_channel(elem, i)) 
when considering range: -0x80000000 <= value <= -1
taking True path
1692         {
1693             snd_mixer_selem_get_capture_switch(elem, i, &ival);
1694             item = PyLong_FromLong(ival);
when PyLong_FromLong() fails
1695             PyList_Append(result, item);
returning -1 from PyList_Append() due to NULL item
1696             Py_DECREF(item);
dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1696
found 3 similar trace(s) to this
1697         }
1698     }
1699     return result;
1700 }

File: alsaaudio.c
Function: alsamixer_getrec
Error: calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:1695
1662 static PyObject *
1663 alsamixer_getrec(alsamixer_t *self, PyObject *args) 
1664 {
1665     snd_mixer_elem_t *elem;
1666     int i;
1667     int ival;
1668     PyObject *result;
1669     PyObject *item;
1670 
1671     if (!PyArg_ParseTuple(args,":getrec")) 
when PyArg_ParseTuple() succeeds
taking False path
1672         return NULL;
1673     
1674     if (!self->handle) 
when treating unknown struct snd_mixer_t * from alsaaudio.c:1674 as non-NULL
taking False path
1675     {
1676         PyErr_SetString(ALSAAudioError, "Mixer is closed");
1677         return NULL;
1678     }
1679 
1680     elem = alsamixer_find_elem(self->handle,self->controlname,self->controlid);
1681     if (!snd_mixer_selem_has_capture_switch(elem)) 
when considering range: -0x80000000 <= value <= -1
taking False path
1682     {
1683         PyErr_SetString(ALSAAudioError,"Mixer has no record switch");
1684         return NULL;
1685     }    
1686 
1687     result = PyList_New(0);
when PyList_New() fails
1688 
1689     for (i = 0; i <= SND_MIXER_SCHN_LAST; i++) 
taking True path
1690     {
1691         if (snd_mixer_selem_has_capture_channel(elem, i)) 
when considering range: -0x80000000 <= value <= -1
taking True path
1692         {
1693             snd_mixer_selem_get_capture_switch(elem, i, &ival);
1694             item = PyLong_FromLong(ival);
when PyLong_FromLong() succeeds
1695             PyList_Append(result, item);
calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:1695
PyList_Append() invokes Py_TYPE() on the pointer via the PyList_Check() macro, thus accessing (NULL)->ob_type
found 7 similar trace(s) to this
1696             Py_DECREF(item);
1697         }
1698     }
1699     return result;
1700 }