mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
Fix leak introduced by previous typeobject.c checkin.
This commit is contained in:
parent
02c58f865c
commit
22c3dda1e6
1 changed files with 3 additions and 4 deletions
|
|
@ -3569,16 +3569,15 @@ wrap_objobjproc(PyObject *self, PyObject *args, void *wrapped)
|
||||||
{
|
{
|
||||||
objobjproc func = (objobjproc)wrapped;
|
objobjproc func = (objobjproc)wrapped;
|
||||||
int res;
|
int res;
|
||||||
PyObject *value, *ret;
|
PyObject *value;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O", &value))
|
if (!PyArg_ParseTuple(args, "O", &value))
|
||||||
return NULL;
|
return NULL;
|
||||||
res = (*func)(self, value);
|
res = (*func)(self, value);
|
||||||
if (res == -1 && PyErr_Occurred())
|
if (res == -1 && PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
ret = PyObject_IsTrue(PyInt_FromLong((long)res)) ? Py_True : Py_False;
|
else
|
||||||
Py_INCREF(ret);
|
return PyBool_FromLong(res);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue