Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db4061c

Browse files
Issue #24377: Fix a ref leak in OrderedDict.__repr__.
1 parent 4c72918 commit db4061c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Library
2525

2626
- Issue #24362: Simplify the C OrderedDict fast nodes resize logic.
2727

28+
- Issue #24377: Fix a ref leak in OrderedDict.__repr__.
29+
2830

2931
What's New in Python 3.5.0 beta 2?
3032
==================================

Objects/odictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ odict_repr(PyODictObject *self)
15781578
if (value == NULL) {
15791579
if (!PyErr_Occurred())
15801580
PyErr_SetObject(PyExc_KeyError, key);
1581-
return NULL;
1581+
goto Done;
15821582
}
15831583
pair = PyTuple_Pack(2, key, value);
15841584
if (pair == NULL)

0 commit comments

Comments
 (0)