summaryrefslogtreecommitdiffstats
path: root/Modules/_json.c
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-04-04 19:24:16 (GMT)
committerGitHub <noreply@github.com>2020-04-04 19:24:16 (GMT)
commitb709302f3125622986bd458dfb2954fda5e8366d (patch)
treea86af298ed71e6ee71c42802ef0ee969e43c48be /Modules/_json.c
parenta94e6272f16381349dbed74cdb738ec8ae23b4fe (diff)
downloadcpython-b709302f3125622986bd458dfb2954fda5e8366d.zip
cpython-b709302f3125622986bd458dfb2954fda5e8366d.tar.gz
cpython-b709302f3125622986bd458dfb2954fda5e8366d.tar.bz2
bpo-40077: Fix potential refleaks of _json: traverse memo (GH-19344)
Fix possible refleaks in _json module, memo of PyScannerObject should be traversed.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r--Modules/_json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index 4682cf8..8117d16 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;
}