summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-29 07:18:04 (GMT)
committerGitHub <noreply@github.com>2024-05-29 07:18:04 (GMT)
commita62681c4055f62484efe1edc2446fc4cce5c2bf0 (patch)
treebad8cc39ef4f084f94b5282c6ef40866e4a800ab /Python
parent46a37a1a92a1fc2850979d9d56a70afe4ea10b94 (diff)
downloadcpython-a62681c4055f62484efe1edc2446fc4cce5c2bf0.zip
cpython-a62681c4055f62484efe1edc2446fc4cce5c2bf0.tar.gz
cpython-a62681c4055f62484efe1edc2446fc4cce5c2bf0.tar.bz2
[3.12] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (GH-119705) (#119708)
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-tokenize.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c
index cb050e7..664e7d8 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);