diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-07-20 11:52:54 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-07-20 11:52:54 (GMT) |
commit | a0364764fdaca63881dc78d8625e05d9880fc440 (patch) | |
tree | d13c4ea3329997b38354904cf90d09dc007dfa01 | |
parent | 5e1658c5d7030d03148a4805ffb09d4374963580 (diff) | |
parent | ddcb6206bf7feebb0a1671e475ee877f683af145 (diff) | |
download | cpython-a0364764fdaca63881dc78d8625e05d9880fc440.zip cpython-a0364764fdaca63881dc78d8625e05d9880fc440.tar.gz cpython-a0364764fdaca63881dc78d8625e05d9880fc440.tar.bz2 |
Merge 3.2
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Objects/classobject.c | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -10,6 +10,8 @@ What's New in Python 3.3.0 Beta 2? Core and Builtins ----------------- +- Issue #15404: Refleak in PyMethodObject repr. + - Issue #15394: An issue in PyModule_Create that caused references to be leaked on some error paths has been fixed. Patch by Julia Lawall. diff --git a/Objects/classobject.c b/Objects/classobject.c index 0416a6a..c481dd3 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -244,8 +244,10 @@ method_repr(PyMethodObject *a) else { klassname = _PyObject_GetAttrId(klass, &PyId___name__); if (klassname == NULL) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { + Py_XDECREF(funcname); return NULL; + } PyErr_Clear(); } else if (!PyUnicode_Check(klassname)) { |