[python-ldap] Reference leaks in error-handling paths
Petr Spacek
pspacek at redhat.com
Thu Sep 25 12:22:36 CEST 2014
Hello,
static analysis tool gcc-python-plugin detected some bugs within the C Python
extension module.
Full report from analyzer is at:
https://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-04-04/python-ldap-2.4.6-2.fc17/
Within the category "Reference leaks" the 6 issues reported are all memory
leaks in error-handling paths. 5 out of them relate to Py_BuildValue:
http://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html#reference-leak-in-py-buildvalue
The other, in
File: Modules/LDAPObject.c
Function: interaction
Error: ob_refcnt of '*result' is 1 too high
is a missing Py_DECREF().
Detailed discussion about some other potential bugs is at:
https://bugzilla.redhat.com/show_bug.cgi?id=809943
Credit for uncovering these problems belongs to Dave Malcolm
<dmalcolm at redhat.com>.
I'm not able to send you patch now so I'm sending the bug report to let you
know about the problem.
Have a nice day!
--
Petr Spacek @ Red Hat
More information about the python-ldap
mailing list