[3.13] gh-119704: Fix reference leak in the `Python/Python-tokenize.c` (GH-119705) (#119707)

This commit is contained in:
Miss Islington (bot) 2024-05-29 09:26:13 +02:00 committed by GitHub
parent 17d3398486
commit 7a9534f595
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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