[New-bugs-announce] [issue25716] typeobject.c call_method & call_maybe can leak references on 'func'

Myron Walker report at bugs.python.org
Mon Nov 23 17:44:39 EST 2015


New submission from Myron Walker:

The 'call_method' and 'call_maybe' function in typeobject.c are leaking
a reference on 'func' in cases where 'args == NULL'.  In this case both 
of these functions exit like so:

    if (args == NULL)
        return NULL;

When they need to do:

    if (args == NULL)
    {
        Py_DECREF(func);
        return NULL;
    }

----------
components: Interpreter Core
messages: 255235
nosy: Myron Walker
priority: normal
severity: normal
status: open
title: typeobject.c call_method & call_maybe can leak references on 'func'
type: resource usage
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25716>
_______________________________________


More information about the New-bugs-announce mailing list