Skip to content

Commit dfeec34

Browse files
authored
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
1 parent 068ebf9 commit dfeec34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

PC/winreg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,6 +1813,7 @@ winreg_SetValueEx_impl(PyObject *module, HKEY key,
18131813
if (PySys_Audit("winreg.SetValue", "nunO",
18141814
(Py_ssize_t)key, value_name, (Py_ssize_t)type,
18151815
value) < 0) {
1816+
PyMem_Free(data);
18161817
return NULL;
18171818
}
18181819
Py_BEGIN_ALLOW_THREADS

0 commit comments

Comments
 (0)