File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ What's New in Python 3.2.4
10
10
Core and Builtins
11
11
-----------------
12
12
13
+ - Issue #15404: Refleak in PyMethodObject repr.
14
+
13
15
- Issue #15394: An issue in PyModule_Create that caused references to
14
16
be leaked on some error paths has been fixed. Patch by Julia Lawall.
15
17
Original file line number Diff line number Diff line change @@ -243,8 +243,10 @@ method_repr(PyMethodObject *a)
243
243
else {
244
244
klassname = PyObject_GetAttrString (klass , "__name__" );
245
245
if (klassname == NULL ) {
246
- if (!PyErr_ExceptionMatches (PyExc_AttributeError ))
246
+ if (!PyErr_ExceptionMatches (PyExc_AttributeError )) {
247
+ Py_XDECREF (funcname );
247
248
return NULL ;
249
+ }
248
250
PyErr_Clear ();
249
251
}
250
252
else if (!PyUnicode_Check (klassname )) {
You can’t perform that action at this time.
0 commit comments