cpython: 37705f89c72b (original) (raw)

Mercurial > cpython

changeset 106470:37705f89c72b

Fix refleaks if Py_EnterRecursiveCall() fails Issue #29306: Destroy argstuple and kwdict if Py_EnterRecursiveCall() fails. [#29306]

Victor Stinner victor.stinner@gmail.com
date Wed, 08 Feb 2017 12:57:09 +0100
parents df334ed278ce
children f507545ad22a
files Objects/abstract.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-)[+] [-] Objects/abstract.c 5

line wrap: on

line diff

--- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2350,14 +2350,15 @@ PyObject * } if (Py_EnterRecursiveCall(" while calling a Python object")) {

result = (*call)(callable, argstuple, kwargs); Py_LeaveRecursiveCall(); - Py_DECREF(argstuple); + result = _Py_CheckFunctionResult(callable, result, NULL); return result; } @@ -2544,6 +2545,8 @@ PyObject * } if (Py_EnterRecursiveCall(" while calling a Python object")) {