Browse Source

bpo-40077: Fix potential refleaks of _json: traverse memo (GH-19344)

Fix possible refleaks in _json module, memo of PyScannerObject
should be traversed.
pull/19367/head
Hai Shi 6 years ago
committed by GitHub
parent
commit
b709302f31
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Misc/NEWS.d/next/Core and Builtins/2020-04-04-12-43-19.bpo-40077.m15TTX.rst
  2. 1
      Modules/_json.c

1
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.

1
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;
}

Loading…
Cancel
Save