Errors seen in LOGS/net-snmp-5.7.1-4.fc17

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

Raw build logs can be seen here

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

netsnmp/client_intf.c py_netsnmp_construct_varbind ob_refcnt of '*module' 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)

netsnmp/client_intf.c py_netsnmp_attr_set_string dereferencing NULL (val_obj->ob_refcnt) at netsnmp/client_intf.c:1190
netsnmp/client_intf.c __py_netsnmp_update_session_errors dereferencing NULL (tmp_for_conversion->ob_refcnt) at netsnmp/client_intf.c:1232
netsnmp/client_intf.c __py_netsnmp_update_session_errors dereferencing NULL (tmp_for_conversion->ob_refcnt) at netsnmp/client_intf.c:1228

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
netsnmp/client_intf.c netsnmp_create_session_tunneled 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