mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
This commit is contained in:
parent
71135624d8
commit
f5f1fe0cb5
2 changed files with 6 additions and 1 deletions
|
|
@ -113,6 +113,9 @@ Core and Builtins
|
||||||
Library
|
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
|
- Issue #10287: nntplib now queries the server's CAPABILITIES first before
|
||||||
sending MODE READER, and only sends it if not already in READER mode.
|
sending MODE READER, and only sends it if not already in READER mode.
|
||||||
Patch by Hynek Schlawack.
|
Patch by Hynek Schlawack.
|
||||||
|
|
|
||||||
|
|
@ -1401,8 +1401,10 @@ defdict_repr(defdictobject *dd)
|
||||||
{
|
{
|
||||||
int status = Py_ReprEnter(dd->default_factory);
|
int status = Py_ReprEnter(dd->default_factory);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
if (status < 0)
|
if (status < 0) {
|
||||||
|
Py_DECREF(baserepr);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
defrepr = PyUnicode_FromString("...");
|
defrepr = PyUnicode_FromString("...");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue