diff options
author | Barry Warsaw <barry@python.org> | 1999-01-27 23:13:59 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1999-01-27 23:13:59 (GMT) |
commit | f988e687a1f0251c36fe620e5f562c113f338cd9 (patch) | |
tree | 811b3c0066449e92cee6bef3c42520e71feb7359 /Python | |
parent | 583cc31c223de8f021db7e427876e6097374bc9e (diff) | |
download | cpython-f988e687a1f0251c36fe620e5f562c113f338cd9.zip cpython-f988e687a1f0251c36fe620e5f562c113f338cd9.tar.gz cpython-f988e687a1f0251c36fe620e5f562c113f338cd9.tar.bz2 |
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.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d230261..df6b98b 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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; |