Skip to content

Commit b709302

Browse files
authored
bpo-40077: Fix potential refleaks of _json: traverse memo (GH-19344)
Fix possible refleaks in _json module, memo of PyScannerObject should be traversed.
1 parent a94e627 commit b709302

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix possible refleaks in :mod:`_json`, memo of PyScannerObject should be traversed.

Modules/_json.c

+1
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ scanner_traverse(PyScannerObject *self, visitproc visit, void *arg)
652652
Py_VISIT(self->parse_float);
653653
Py_VISIT(self->parse_int);
654654
Py_VISIT(self->parse_constant);
655+
Py_VISIT(self->memo);
655656
return 0;
656657
}
657658

0 commit comments

Comments
 (0)