We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8541587 commit 2e19e8eCopy full SHA for 2e19e8e
2 files changed
Misc/NEWS
@@ -90,6 +90,9 @@ Core and Builtins
90
Library
91
-------
92
93
+- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
94
+ Patch by Suman Saha.
95
+
96
- Issue #13979: A bug in ctypes.util.find_library that caused
97
the wrong library name to be returned has been fixed.
98
Modules/_collectionsmodule.c
@@ -1475,8 +1475,10 @@ defdict_repr(defdictobject *dd)
1475
{
1476
int status = Py_ReprEnter(dd->default_factory);
1477
if (status != 0) {
1478
- if (status < 0)
+ if (status < 0) {
1479
+ Py_DECREF(baserepr);
1480
return NULL;
1481
+ }
1482
defrepr = PyString_FromString("...");
1483
}
1484
else
0 commit comments