We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3be7a8b commit ddcb620Copy full SHA for ddcb620
2 files changed
Misc/NEWS
@@ -10,6 +10,8 @@ What's New in Python 3.2.4
10
Core and Builtins
11
-----------------
12
13
+- Issue #15404: Refleak in PyMethodObject repr.
14
+
15
- Issue #15394: An issue in PyModule_Create that caused references to
16
be leaked on some error paths has been fixed. Patch by Julia Lawall.
17
Objects/classobject.c
@@ -243,8 +243,10 @@ method_repr(PyMethodObject *a)
243
else {
244
klassname = PyObject_GetAttrString(klass, "__name__");
245
if (klassname == NULL) {
246
- if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
247
+ Py_XDECREF(funcname);
248
return NULL;
249
+ }
250
PyErr_Clear();
251
}
252
else if (!PyUnicode_Check(klassname)) {
0 commit comments