diff options
Diffstat (limited to 'PC/winreg.c')
-rw-r--r-- | PC/winreg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/PC/winreg.c b/PC/winreg.c index a2511d5..79f08a6 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -938,7 +938,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ) wchar_t *data = (wchar_t *)retDataBuf; int len = retDataSize / 2; int s = countStrings(data, len); - wchar_t **str = (wchar_t **)malloc(sizeof(wchar_t *)*s); + wchar_t **str = (wchar_t **)PyMem_Malloc(sizeof(wchar_t *)*s); if (str == NULL) return PyErr_NoMemory(); @@ -959,7 +959,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ) index, PyUnicode_FromWideChar(str[index], len)); } - free(str); + PyMem_Free(str); break; } |