summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-03-13 18:08:10 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-03-13 18:08:10 (GMT)
commit9cb1ec5fb5e4aeb6b3e48341c92b96cdd09e634b (patch)
tree0ac23ca88cc7cc510e8010be74c19a5375050113 /PC
parent58c767fa3046d00db1b853c3e9a26785d0b3ac8c (diff)
downloadcpython-9cb1ec5fb5e4aeb6b3e48341c92b96cdd09e634b.zip
cpython-9cb1ec5fb5e4aeb6b3e48341c92b96cdd09e634b.tar.gz
cpython-9cb1ec5fb5e4aeb6b3e48341c92b96cdd09e634b.tar.bz2
Issue #20908: PyMem_Malloc() must be used with PyMem_Free(), not with free()
Diffstat (limited to 'PC')
-rw-r--r--PC/winreg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 7671317..d23810b 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,