mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
(cherry picked from commit dfeec347f21b86879ba8f27f567bb275b243f1bc) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
05429c917c
commit
f79577ddbd
@ -1788,6 +1788,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user