Errors seen in LOGS/python-bibtex-1.2.5-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 leaks

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

bibtexmodule.c bib_reverse ob_refcnt of '*authobj' is 1 too high
bibtexmodule.c _bib_next ob_refcnt of '*name' 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)

bibtexmodule.c bib_open_file dereferencing NULL (ret->obj) at bibtexmodule.c:144
bibtexmodule.c bib_reverse dereferencing NULL (MEM[(struct PyBibtexField_Object *)tmp].obj) at bibtexmodule.c:703
bibtexmodule.c bib_copy_field dereferencing NULL (new_obj->obj) at bibtexmodule.c:326
recodemodule.c py_new_recoder dereferencing NULL (ret->obj) at recodemodule.c:122
bibtexmodule.c _bib_next dereferencing NULL (dico->ob_refcnt) at bibtexmodule.c:525
bibtexmodule.c fill_dico dereferencing NULL (MEM[(struct PyBibtexField_Object *)tmp2].obj) at bibtexmodule.c:414
bibtexmodule.c fill_dico calling PyDict_SetItem with NULL as argument 2 (tmp1) at bibtexmodule.c:414
bibtexmodule.c fill_struct_dico dereferencing NULL (MEM[(struct PyBibtexField_Object *)tmp2].obj) at bibtexmodule.c:433
bibtexmodule.c fill_struct_dico calling PyDict_SetItem with NULL as argument 2 (tmp1) at bibtexmodule.c:433
bibtexmodule.c bib_open_string dereferencing NULL (ret->obj) at bibtexmodule.c:174
bibtexmodule.c bib_set_native dereferencing NULL (MEM[(struct PyBibtexField_Object *)tmp].obj) at bibtexmodule.c:399

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
bibtexmodule.c bib_open_file returning (PyObject*)NULL without setting an exception
bibtexmodule.c bib_set_offset returning (PyObject*)NULL without setting an exception
bibtexmodule.c bib_reverse returning (PyObject*)NULL without setting an exception
bibtexmodule.c bib_open_string returning (PyObject*)NULL without setting an exception
bibtexmodule.c bib_set_native returning (PyObject*)NULL without setting an exception