From 73b14ac08f73903eb1205e1d86f0eb417004b935 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 9cc4b45de49f0b..09fad18b5b4df7 100644 --- a/Python/Python-tokenize.c +++ b/Python/Python-tokenize.c @@ -311,6 +311,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);