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.
else {
klassname = PyObject_GetAttrString(klass, "__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)) {