mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
Issue 13085: Fix some memory leaks. Patch by Stefan Krah.
This commit is contained in:
parent
5c0fb00ad8
commit
0b1d348990
2 changed files with 20 additions and 11 deletions
|
@ -9075,6 +9075,7 @@ replace(PyObject *self, PyObject *str1,
|
|||
PyUnicode_KIND_SIZE(rkind, slen-i));
|
||||
}
|
||||
u = PyUnicode_FromKindAndData(rkind, res, new_size);
|
||||
PyMem_Free(res);
|
||||
}
|
||||
if (srelease)
|
||||
PyMem_FREE(sbuf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue