8000 Prevent leak · python/cpython@d3d4ff5 · GitHub
[go: up one dir, main page]

Skip to content

Commit d3d4ff5

Browse files
committed
Prevent leak
1 parent 67b3a9c commit d3d4ff5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/Python-tokenize.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ tokenizeriter_next(tokenizeriterobject *it)
240240
type = NAME;
241241
}
242242
else if (type == NEWLINE) {
243+
Py_DECREF(str);
243244
if (it->tok->start[0] == '\r') {
244245
str = PyUnicode_FromString("\r\n");
245246
} else {

0 commit comments

Comments
 (0)
0