Skip to content
Prev Previous commit
Prevent leak
  • Loading branch information
mgmacias95 committed May 28, 2023
commit d3d4ff5fd74338b143c04befb4e7214f05b3ff55
1 change: 1 addition & 0 deletions Python/Python-tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ tokenizeriter_next(tokenizeriterobject *it)
type = NAME;
}
else if (type == NEWLINE) {
Py_DECREF(str);
if (it->tok->start[0] == '\r') {
str = PyUnicode_FromString("\r\n");
Comment thread
mgmacias95 marked this conversation as resolved.
} else {
Expand Down