[Python-checkins] cpython (3.5): Issue #24377: Fix a ref leak in OrderedDict.__repr__.

eric.snow python-checkins at python.org
Wed Jun 3 19:11:34 CEST 2015


https://hg.python.org/cpython/rev/6df1b3c6c8e8
changeset: 96500:6df1b3c6c8e8
branch: 3.5
parent: 96498:c78c5832ccc0
user: Eric Snow <ericsnowcurrently at gmail.com>
date: Wed Jun 03 11:09:48 2015 -0600
summary:
 Issue #24377: Fix a ref leak in OrderedDict.__repr__.
files:
 Misc/NEWS | 2 ++
 Objects/odictobject.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,6 +25,8 @@
 
 - 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?
 ==================================
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -1578,7 +1578,7 @@
 if (value == NULL) {
 if (!PyErr_Occurred())
 PyErr_SetObject(PyExc_KeyError, key);
- return NULL;
+ goto Done;
 }
 pair = PyTuple_Pack(2, key, value);
 if (pair == NULL)
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /