Skip to content

Commit

Permalink
Prevent leak
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmacias95 committed May 28, 2023
1 parent 67b3a9c commit d3d4ff5
Showing 1 changed file with 1 addition and 0 deletions.
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");
} else {
Expand Down

0 comments on commit d3d4ff5

Please sign in to comment.