mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
(cherry picked from commit dfeec347f2)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
05429c917c
commit
f79577ddbd
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue