Commit 92ce1b43 authored by Benjamin Peterson's avatar Benjamin Peterson

merge 3.3 (#23362)

parents 5061e67f e5a853c3
...@@ -8665,7 +8665,7 @@ _PyUnicode_TranslateCharmap(PyObject *input, ...@@ -8665,7 +8665,7 @@ _PyUnicode_TranslateCharmap(PyObject *input,
/* allocate enough for a simple 1:1 translation without /* allocate enough for a simple 1:1 translation without
replacements, if we need more, we'll resize */ replacements, if we need more, we'll resize */
osize = size; osize = size;
output = PyMem_Malloc(osize * sizeof(Py_UCS4)); output = PyMem_NEW(Py_UCS4, osize);
opos = 0; opos = 0;
if (output == NULL) { if (output == NULL) {
PyErr_NoMemory(); PyErr_NoMemory();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment