[New-bugs-announce] [issue14752] Memleak in typeobject add_methods()

Damien Cassou report at bugs.python.org
Tue May 8 15:19:49 CEST 2012

New submission from Damien Cassou <damien.cassou at gmail.com>:

In add_methods() function from typeobject.c, it looks like Py_DECREF is not called where it should be. Please find attached a patch that fixes the leak. The patch is also in commit #85a01718b3e3 of my hg repository under the branch fix_add_methods_leak.

This bug has been found using Coccinelle (http://coccinelle.lip6.fr/) and a dedicated semantic patch (https://gist.github.com/2634899).

components: Interpreter Core
files: fix_add_methods_leak.patch
hgrepos: 122
keywords: patch
messages: 160203
nosy: cassou, lemburg, tim_one
priority: normal
severity: normal
status: open
title: Memleak in typeobject add_methods()
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file25495/fix_add_methods_leak.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list