From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 29 May 2024 07:18:04 +0000 (+0200) Subject: [3.12] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (GH-119705... X-Git-Tag: v3.12.4~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a62681c4055f62484efe1edc2446fc4cce5c2bf0;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (GH-119705) (#119708) --- diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index cb050e77b152..664e7d8a50af 100644 --- a/Python/Python-tokenize.c +++ b/Python/Python-tokenize.c @@ -313,6 +313,7 @@ static void tokenizeriter_dealloc(tokenizeriterobject *it) { PyTypeObject *tp = Py_TYPE(it); + Py_XDECREF(it->last_line); _PyTokenizer_Free(it->tok); tp->tp_free(it); Py_DECREF(tp);