summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-03-09 07:30:43 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-03-09 07:30:43 (GMT)
commitc8df5780e116a44682df91773eb9cad13e6699b0 (patch)
tree7f989e8518ea6acdd9c687a0f37377c6c851ea80 /Objects
parent5284b4474e631275e5c419dcb7a87eeebc391b28 (diff)
downloadcpython-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.c1
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;
}