Commit 7dd809fd authored by Barry Warsaw's avatar Barry Warsaw

builtin_complex(): Nailed memory leak. This one's in the instance

test for classes with a __complex__() method.  The attribute is pulled
out of the instance with PyObject_GetAttr() but this transfers
ownership and the function object was never DECREF'd.
parent 001640c8
......@@ -409,6 +409,7 @@ builtin_complex(self, args)
return NULL;
r = PyEval_CallObject(f, args);
Py_DECREF(args);
Py_DECREF(f);
if (r == NULL)
return NULL;
own_r = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment