Errors seen in LOGS/newt-0.52.14-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

snackmodule.c widgetListboxGetSel ob_refcnt of PyListObject is 1 too high
snackmodule.c widgetListboxGetSel ob_refcnt of PyIntObject is 1 too high
snackmodule.c widgetListboxGetSel ob_refcnt of '*sel' is 1 too high
snackmodule.c widgetCheckboxTreeGetSel ob_refcnt of PyListObject is 1 too high
snackmodule.c widgetCheckboxTreeGetSel ob_refcnt of PyIntObject is 1 too high
snackmodule.c widgetCheckboxTreeGetSel ob_refcnt of '*sel' is 1 too high

Reference leak within initialization

Code paths in which the reference count of an object is left too high, but within an initialization routine, and thus likely to only happen once

snackmodule.c init_snack ob_refcnt of PyIntObject is 1 too high
snackmodule.c init_snack ob_refcnt of PyStringObject 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)

snackmodule.c scaleWidget dereferencing NULL (widget->co) at snackmodule.c:333
snackmodule.c compactbuttonWidget dereferencing NULL (widget->co) at snackmodule.c:641
snackmodule.c buttonWidget dereferencing NULL (widget->co) at snackmodule.c:629
snackmodule.c labelWidget dereferencing NULL (widget->co) at snackmodule.c:653
snackmodule.c widgetListboxGetSel calling PyList_Append with NULL as argument 1 (sel) at snackmodule.c:1106
snackmodule.c textWidget dereferencing NULL (widget->co) at snackmodule.c:736
snackmodule.c checkboxTreeWidget dereferencing NULL (widget->co) at snackmodule.c:1170
snackmodule.c widgetCheckboxTreeGetSel calling PyList_Append with NULL as argument 1 (sel) at snackmodule.c:1303
snackmodule.c radioButtonWidget dereferencing NULL (widget->co) at snackmodule.c:756
snackmodule.c checkboxWidget dereferencing NULL (widget->achar) at snackmodule.c:767

Returning (PyObject*)NULL without setting an exception

These messages are often false-positives: the analysis tool has no knowledge about internal API calls that can lead to an exception being set
snackmodule.c widgetCheckboxTreeGetEntryValue returning (PyObject*)NULL without setting an exception

Implementation notes for gcc-with-cpychecker

The following "Py" functions were used but aren't yet explicitly handled by gcc-with-cpychecker