From 49dff6f2599a99656f1ddfdc10077c31fe3130b5 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 13 Mar 2014 19:08:10 +0100 Subject: Issue #20908: PyMem_Malloc() must be used with PyMem_Free(), not with free() --- PC/winreg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'PC/winreg.c') diff --git a/PC/winreg.c b/PC/winreg.c index 7671317726..d23810b65d 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -944,7 +944,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ) fixupMultiSZ(str, data, len); obData = PyList_New(s); if (obData == NULL) { - free(str); + PyMem_Free(str); return NULL; } for (index = 0; index < s; index++) @@ -954,7 +954,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ) PyErr_SetString(PyExc_OverflowError, "registry string is too long for a Python string"); Py_DECREF(obData); - free(str); + PyMem_Free(str); return NULL; } PyList_SetItem(obData, -- cgit v1.2.1