Skip to content

Commit a036476

Browse files
committed
Merge 3.2
2 parents 5e1658c + ddcb620 commit a036476

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ What's New in Python 3.3.0 Beta 2?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #15404: Refleak in PyMethodObject repr.
14+
1315
- Issue #15394: An issue in PyModule_Create that caused references to
1416
be leaked on some error paths has been fixed. Patch by Julia Lawall.
1517

Objects/classobject.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,10 @@ method_repr(PyMethodObject *a)
244244
else {
245245
klassname = _PyObject_GetAttrId(klass, &PyId___name__);
246246
if (klassname == NULL) {
247-
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
247+
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
248+
Py_XDECREF(funcname);
248249
return NULL;
250+
}
249251
PyErr_Clear();
250252
}
251253
else if (!PyUnicode_Check(klassname)) {

0 commit comments

Comments
 (0)