From 39f31497bc2df485fd44cc4463f8859590eab8f0 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Wed, 29 May 2024 09:56:44 +0300 Subject: [PATCH] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (GH-119705) (cherry picked from commit c0faade891e6ccb61137041fe10cc05e5fa8d534) Co-authored-by: Kirill Podoprigora --- Python/Python-tokenize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index cb050e77b1520d..664e7d8a50af8c 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);