commit | dfeec347f21b86879ba8f27f567bb275b243f1bc | [log] [tgz] |
---|---|---|
author | Zackery Spytz <zspytz@gmail.com> | Tue Mar 30 00:22:34 2021 -0600 |
committer | GitHub <noreply@github.com> | Tue Mar 30 15:22:34 2021 +0900 |
tree | 00c383d6993cd0ae8f631084154771f277ab31e4 | |
parent | 068ebf9729d440cef03e4c57e3db83c851146172 [diff] |
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
diff --git a/PC/winreg.c b/PC/winreg.c index fb488d8..004a89a 100644 --- a/PC/winreg.c +++ b/PC/winreg.c
@@ -1813,6 +1813,7 @@ winreg_SetValueEx_impl(PyObject *module, HKEY key, if (PySys_Audit("winreg.SetValue", "nunO", (Py_ssize_t)key, value_name, (Py_ssize_t)type, value) < 0) { + PyMem_Free(data); return NULL; } Py_BEGIN_ALLOW_THREADS