mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Issue #24377: Fix a ref leak in OrderedDict.__repr__.
This commit is contained in:
parent
4c72918a59
commit
db4061cb9d
2 changed files with 3 additions and 1 deletions
|
|
@ -25,6 +25,8 @@ Library
|
||||||
|
|
||||||
- Issue #24362: Simplify the C OrderedDict fast nodes resize logic.
|
- Issue #24362: Simplify the C OrderedDict fast nodes resize logic.
|
||||||
|
|
||||||
|
- Issue #24377: Fix a ref leak in OrderedDict.__repr__.
|
||||||
|
|
||||||
|
|
||||||
What's New in Python 3.5.0 beta 2?
|
What's New in Python 3.5.0 beta 2?
|
||||||
==================================
|
==================================
|
||||||
|
|
|
||||||
|
|
@ -1578,7 +1578,7 @@ odict_repr(PyODictObject *self)
|
||||||
if (value == NULL) {
|
if (value == NULL) {
|
||||||
if (!PyErr_Occurred())
|
if (!PyErr_Occurred())
|
||||||
PyErr_SetObject(PyExc_KeyError, key);
|
PyErr_SetObject(PyExc_KeyError, key);
|
||||||
return NULL;
|
goto Done;
|
||||||
}
|
}
|
||||||
pair = PyTuple_Pack(2, key, value);
|
pair = PyTuple_Pack(2, key, value);
|
||||||
if (pair == NULL)
|
if (pair == NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue