Show More
@@ -158,7 +158,7 static PyObject *fixws(PyObject *self, P | |||
|
158 | 158 | r = PyBytes_AsString(s); |
|
159 | 159 | rlen = PyBytes_Size(s); |
|
160 | 160 | |
|
161 | w = (char *)malloc(rlen ? rlen : 1); | |
|
161 | w = (char *)PyMem_Malloc(rlen ? rlen : 1); | |
|
162 | 162 | if (!w) |
|
163 | 163 | goto nomem; |
|
164 | 164 | |
@@ -178,7 +178,7 static PyObject *fixws(PyObject *self, P | |||
|
178 | 178 | result = PyBytes_FromStringAndSize(w, wlen); |
|
179 | 179 | |
|
180 | 180 | nomem: |
|
181 |
|
|
|
181 | PyMem_Free(w); | |
|
182 | 182 | return result ? result : PyErr_NoMemory(); |
|
183 | 183 | } |
|
184 | 184 |
General Comments 0
You need to be logged in to leave comments.
Login now