summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 14318f67d3..dcfde347c3 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;
}