From: Kirill Podoprigora Date: Wed, 29 May 2024 06:56:44 +0000 (+0300) Subject: gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (#119705) X-Git-Tag: v3.14.0a1~1727 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0faade891e6ccb61137041fe10cc05e5fa8d534;p=thirdparty%2FPython%2Fcpython.git gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (#119705) --- diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 9cc4b45de49f..09fad18b5b4d 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);