Commit f5f1fe0c authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #13015: Fix a possible reference leak in defaultdict.__repr__.

Patch by Suman Saha.
parent 71135624
......@@ -113,6 +113,9 @@ Core and Builtins
Library
-------
- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
- Issue #10287: nntplib now queries the server's CAPABILITIES first before
sending MODE READER, and only sends it if not already in READER mode.
Patch by Hynek Schlawack.
......
......@@ -1401,8 +1401,10 @@ defdict_repr(defdictobject *dd)
{
int status = Py_ReprEnter(dd->default_factory);
if (status != 0) {
if (status < 0)
if (status < 0) {
Py_DECREF(baserepr);
return NULL;
}
defrepr = PyUnicode_FromString("...");
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment