8000 bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038) · python/cpython@f79577d · GitHub
[go: up one dir, main page]

Skip to content

Commit f79577d

Browse files
bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038)
(cherry picked from commit dfeec34) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
1 parent 05429c9 commit f79577d

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
@@ -1788,6 +1788,7 @@ winreg_SetValueEx_impl(PyObject *module, HKEY key,
17881788
if (PySys_Audit("winreg.SetValue", "nunO",
17891789
(Py_ssize_t)key, value_name, (Py_ssize_t)type,
17901790
value) < 0) {
1791+
PyMem_Free(data);
17911792
return NULL;
17921793
}
17931794
Py_BEGIN_ALLOW_THREADS

0 commit comments

Comments
 (0)
0