Errors seen in LOGS/python-GeoIP-1.2.5-0.4.20090931cvs.fc15

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

py_GeoIP.c GeoIP_open_Py ob_refcnt of '*GeoIP' is 1 too high
py_GeoIP.c GeoIP_new_Py ob_refcnt of '*GeoIP' 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)

py_GeoIP.c GeoIP_SetItemInt calling PyDict_SetItem with NULL as argument 3 (valueObj) at py_GeoIP.c:227
py_GeoIP.c GeoIP_SetItemInt calling PyDict_SetItem with NULL as argument 2 (nameObj) at py_GeoIP.c:227
py_GeoIP.c GeoIP_SetItemFloat calling PyDict_SetItem with NULL as argument 3 (valueObj) at py_GeoIP.c:217
py_GeoIP.c GeoIP_SetItemFloat calling PyDict_SetItem with NULL as argument 2 (nameObj) at py_GeoIP.c:217
py_GeoIP.c GeoIP_open_Py dereferencing NULL (GeoIP->gi) at py_GeoIP.c:70
py_GeoIP.c GeoIP_new_Py dereferencing NULL (GeoIP->gi) at py_GeoIP.c:48
py_GeoIP.c initGeoIP calling PyDict_SetItem with NULL as argument 1 (ccont) at py_GeoIP.c:469
py_GeoIP.c initGeoIP calling PyDict_SetItem with NULL as argument 3 (tmp) at py_GeoIP.c:469
py_GeoIP.c initGeoIP calling PyDict_SetItem with NULL as argument 3 (tmp) at py_GeoIP.c:465
py_GeoIP.c initGeoIP calling PyDict_SetItem with NULL as argument 2 (name) at py_GeoIP.c:465
py_GeoIP.c GeoIP_SetItemString calling PyDict_SetItem with NULL as argument 3 (valueObj) at py_GeoIP.c:207
py_GeoIP.c GeoIP_SetItemString calling PyDict_SetItem with NULL as argument 2 (nameObj) at py_GeoIP.c:207

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
py_GeoIP.c GeoIP_range_by_ip_Py 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