Errors seen in LOGS/python-alsaaudio-0.7-2.fc17

This is a summary of errors seen when compiling with an experimental static analysis tool

Raw build logs can be seen here

Reference leaks

Code paths in which the reference count of an object is left too high, leading to memory leaks

alsaaudio.c alsapcm_new ob_refcnt of '*self' is 1 too high
alsaaudio.c alsapcm_polldescriptors ob_refcnt of '*result' is 1 too high
alsaaudio.c alsamixer_getenum ob_refcnt of '*result' is 1 too high
alsaaudio.c alsamixer_new ob_refcnt of '*self' is 1 too high
alsaaudio.c alsacard_list ob_refcnt of '*result' is 1 too high
alsaaudio.c alsamixer_polldescriptors ob_refcnt of '*result' is 1 too high

Segfaults within error-handling paths

Code paths in error-handling that will lead to a segmentatation fault (e.g. under low memory conditions)

alsaaudio.c alsamixer_switchcap dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1330
alsaaudio.c alsamixer_switchcap dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1324
alsaaudio.c alsamixer_getrec dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1696
alsaaudio.c alsamixer_getrec calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:1695
alsaaudio.c alsamixer_volumecap dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1255
alsaaudio.c alsamixer_volumecap dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1249
alsaaudio.c alsapcm_polldescriptors calling PyList_SetItem with NULL as argument 1 (result) at alsaaudio.c:804
alsaaudio.c alsamixer_list dereferencing NULL (mixer->ob_refcnt) at alsaaudio.c:963
alsaaudio.c alsamixer_list calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:962
alsaaudio.c alsamixer_getmute dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1647
alsaaudio.c alsamixer_getmute calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:1646
alsaaudio.c alsamixer_getvolume calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:1437
alsaaudio.c alsamixer_getvolume dereferencing NULL (item->ob_refcnt) at alsaaudio.c:1438
alsaaudio.c alsacard_list dereferencing NULL (item->ob_refcnt) at alsaaudio.c:155
alsaaudio.c alsacard_list dereferencing NULL (result->ob_refcnt) at alsaaudio.c:149
alsaaudio.c alsacard_list calling PyList_Append with NULL as argument 1 (result) at alsaaudio.c:154
alsaaudio.c alsamixer_polldescriptors calling PyList_SetItem with NULL as argument 1 (result) at alsaaudio.c:1954

Possible reference leaks

Code paths in which the reference count of an object might too large - but in which the reference in question came from a function not known to the analyzer.

The analyzer assumes such references are new references, but if the function returns a borrowed reference instead, it's probably not a bug

alsaaudio.c alsamixer_switchcap ob_refcnt of new ref from (unknown) PyUnicodeUCS4_FromString is 1 too high
alsaaudio.c alsamixer_volumecap ob_refcnt of new ref from (unknown) PyUnicodeUCS4_FromString is 1 too high