Errors seen in LOGS/duplicity-0.6.17-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

duplicity/_librsyncmodule.c _librsync_new_deltamaker ob_refcnt of '*dm' 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

duplicity/_librsyncmodule.c init_librsync ob_refcnt of new ref from call to Py_BuildValue 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)

duplicity/_librsyncmodule.c init_librsync calling PyDict_SetItemString with NULL as argument 3 (D.13870) at duplicity/_librsyncmodule.c:477
duplicity/_librsyncmodule.c init_librsync calling PyDict_SetItemString with NULL as argument 3 (D.13869) at duplicity/_librsyncmodule.c:475
duplicity/_librsyncmodule.c init_librsync calling PyDict_SetItemString with NULL as argument 3 (librsyncError.1) at duplicity/_librsyncmodule.c:474

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
duplicity/_librsyncmodule.c _librsync_new_deltamaker returning (PyObject*)NULL without setting an exception
duplicity/_librsyncmodule.c _librsync_patchmaker_cycle returning (PyObject*)NULL without setting an exception
duplicity/_librsyncmodule.c _librsync_deltamaker_cycle returning (PyObject*)NULL without setting an exception
duplicity/_librsyncmodule.c _librsync_sigmaker_cycle 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