gh-101747: Fix refleak in new `OrderedDict` repr (GH-101748)

This commit is contained in:
Nikita Sobolev 2023-02-10 06:00:58 +03:00 committed by GitHub
parent 5b946d3719
commit 34c50ceb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1385,6 +1385,7 @@ odict_repr(PyODictObject *self)
result = PyUnicode_FromFormat("%s(%R)",
_PyType_Name(Py_TYPE(self)),
dcopy);
Py_DECREF(dcopy);
Done:
Py_ReprLeave((PyObject *)self);