From f8adfe947e614ac47b127daea24fedbacf528b9a Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 9 Feb 2023 20:09:31 +0300 Subject: [PATCH] gh-101747: Fix refleak in new `OrderedDict` repr --- Objects/odictobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/odictobject.c b/Objects/odictobject.c index ab2bbed35873de..8bf1e606067ecc 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -1388,6 +1388,7 @@ odict_repr(PyODictObject *self) Done: Py_ReprLeave((PyObject *)self); + Py_XDECREF(dcopy); return result; }