Skip to content

Commit 34c50ce

Browse files
authored
pythongh-101747: Fix refleak in new OrderedDict repr (pythonGH-101748)
1 parent 5b946d3 commit 34c50ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/odictobject.c

+1
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,7 @@ odict_repr(PyODictObject *self)
13851385
result = PyUnicode_FromFormat("%s(%R)",
13861386
_PyType_Name(Py_TYPE(self)),
13871387
dcopy);
1388+
Py_DECREF(dcopy);
13881389

13891390
Done:
13901391
Py_ReprLeave((PyObject *)self);

0 commit comments

Comments
 (0)