https://github.com/python/cpython/commit/c0faade891e6ccb61137041fe10cc05e5fa8d534
commit: c0faade891e6ccb61137041fe10cc05e5fa8d534
branch: main
author: Kirill Podoprigora <[email protected]>
committer: pablogsal <[email protected]>
date: 2024-05-29T07:56:44+01:00
summary:

gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (#119705)

files:
M Python/Python-tokenize.c

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);

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to