summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PC/winreg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 01e3e9f..fd1ccb7 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -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