mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Sf patch #700047: unicode object leaks refcount on resizing
Contributed by Hye-Shik Chang.
This commit is contained in:
parent
5284b4474e
commit
c8df5780e1
1 changed files with 1 additions and 0 deletions
|
@ -276,6 +276,7 @@ int PyUnicode_Resize(PyObject **unicode,
|
|||
return -1;
|
||||
Py_UNICODE_COPY(w->str, v->str,
|
||||
length < v->length ? length : v->length);
|
||||
Py_DECREF(*unicode);
|
||||
*unicode = (PyObject *)w;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue