mirror of https://github.com/python/cpython.git
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
This commit is contained in:
parent
068ebf9729
commit
dfeec347f2
|
@ -1813,6 +1813,7 @@ winreg_SetValueEx_impl(PyObject *module, HKEY key,
|
||||||
if (PySys_Audit("winreg.SetValue", "nunO",
|
if (PySys_Audit("winreg.SetValue", "nunO",
|
||||||
(Py_ssize_t)key, value_name, (Py_ssize_t)type,
|
(Py_ssize_t)key, value_name, (Py_ssize_t)type,
|
||||||
value) < 0) {
|
value) < 0) {
|
||||||
|
PyMem_Free(data);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
|
|
Loading…
Reference in New Issue