Created attachment 6012 [details] HTML report showing the execution paths that leak memory See attached HTML report from gcc-python-plugin's cpychecker: result->ob_refcnt is 1 too high: It looks to me like the returned "result" object from PyObject_CallMethodObjArgs() is leaking a reference in each of these paths through the function. Caveat: this static analyzer is relatively immature, so it could be getting it wrong.
CVSROOT: /cvs/src Module name: src Changes by: pmuldoon@sourceware.org 2011-10-24 11:39:50 Modified files: gdb : ChangeLog gdb/python : py-param.c Log message: 2011-10-24 Phil Muldoon <pmuldoon@redhat.com> PR python/13310 * python/py-param.c (call_doc_function): Correctly deference on function exit. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13450&r2=1.13451 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-param.c.diff?cvsroot=src&r1=1.13&r2=1.14
Fixed and committed as documented in Comment #1.