diff options
author | Raymond Hettinger <python@rcn.com> | 2003-03-09 07:30:43 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-03-09 07:30:43 (GMT) |
commit | c8df5780e116a44682df91773eb9cad13e6699b0 (patch) | |
tree | 7f989e8518ea6acdd9c687a0f37377c6c851ea80 /Objects | |
parent | 5284b4474e631275e5c419dcb7a87eeebc391b28 (diff) | |
download | cpython-c8df5780e116a44682df91773eb9cad13e6699b0.zip cpython-c8df5780e116a44682df91773eb9cad13e6699b0.tar.gz cpython-c8df5780e116a44682df91773eb9cad13e6699b0.tar.bz2 |
Sf patch #700047: unicode object leaks refcount on resizing
Contributed by Hye-Shik Chang.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 14318f6..dcfde34 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; } |