Commit 53b40487 authored by Andrew Svetlov's avatar Andrew Svetlov

Issue #15404: Refleak in PyMethodObject repr.

parent 0571f708
...@@ -10,6 +10,8 @@ What's New in Python 3.2.4 ...@@ -10,6 +10,8 @@ What's New in Python 3.2.4
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #15404: Refleak in PyMethodObject repr.
- Issue #15394: An issue in PyModule_Create that caused references to - Issue #15394: An issue in PyModule_Create that caused references to
be leaked on some error paths has been fixed. Patch by Julia Lawall. be leaked on some error paths has been fixed. Patch by Julia Lawall.
......
...@@ -243,8 +243,10 @@ method_repr(PyMethodObject *a) ...@@ -243,8 +243,10 @@ method_repr(PyMethodObject *a)
else { else {
klassname = PyObject_GetAttrString(klass, "__name__"); klassname = PyObject_GetAttrString(klass, "__name__");
if (klassname == NULL) { if (klassname == NULL) {
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
Py_XDECREF(funcname);
return NULL; return NULL;
}
PyErr_Clear(); PyErr_Clear();
} }
else if (!PyUnicode_Check(klassname)) { else if (!PyUnicode_Check(klassname)) {
......
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