diff options
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2020-04-04-12-43-19.bpo-40077.m15TTX.rst | 1 | ||||
-rw-r--r-- | Modules/_json.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-04-04-12-43-19.bpo-40077.m15TTX.rst b/Misc/NEWS.d/next/Core and Builtins/2020-04-04-12-43-19.bpo-40077.m15TTX.rst new file mode 100644 index 0000000000..21ed615917 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-04-04-12-43-19.bpo-40077.m15TTX.rst @@ -0,0 +1 @@ +Fix possible refleaks in :mod:`_json`, memo of PyScannerObject should be traversed. diff --git a/Modules/_json.c b/Modules/_json.c index 4682cf8462..8117d1601b 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -652,6 +652,7 @@ scanner_traverse(PyScannerObject *self, visitproc visit, void *arg) Py_VISIT(self->parse_float); Py_VISIT(self->parse_int); Py_VISIT(self->parse_constant); + Py_VISIT(self->memo); return 0; } |