diff options
author | Victor Stinner <vstinner@python.org> | 2022-02-25 12:34:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-25 12:34:00 +0100 |
commit | 4657bf701670215ce69b89401b2307022a3b0a7d (patch) | |
tree | 92a8bc023e925254e272a621cb07340b2637cde1 /PC | |
parent | bpo-46756: Fix authorization check in urllib.request (GH-31353) (diff) | |
download | cpython-4657bf701670215ce69b89401b2307022a3b0a7d.tar.gz cpython-4657bf701670215ce69b89401b2307022a3b0a7d.tar.bz2 cpython-4657bf701670215ce69b89401b2307022a3b0a7d.zip |
bpo-1635741: Fix winreg reference leaks (GH-31560)
Clear also the PyHKEY_Type static type at exit.
Diffstat (limited to 'PC')
-rw-r--r-- | PC/winreg.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/PC/winreg.c b/PC/winreg.c index 004a89a5355..2d44c82000c 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -2046,11 +2046,9 @@ PyMODINIT_FUNC PyInit_winreg(void) PyHKEY_Type.tp_doc = PyHKEY_doc; if (PyType_Ready(&PyHKEY_Type) < 0) return NULL; - Py_INCREF(&PyHKEY_Type); if (PyDict_SetItemString(d, "HKEYType", (PyObject *)&PyHKEY_Type) != 0) return NULL; - Py_INCREF(PyExc_OSError); if (PyDict_SetItemString(d, "error", PyExc_OSError) != 0) return NULL; @@ -2116,5 +2114,3 @@ PyMODINIT_FUNC PyInit_winreg(void) ADD_INT(REG_RESOURCE_REQUIREMENTS_LIST); return m; } - - |