diff Objects/unicodeobject.c @ 28242:fe1d571c3f80 legacy-trunk

Sf patch #700047: unicode object leaks refcount on resizing Contributed by Hye-Shik Chang.
author Raymond Hettinger <python@rcn.com>
date Sun, 09 Mar 2003 07:30:43 +0000
parents 7dffcc498c45
children 32bea41fef68
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Sun Mar 09 07:19:38 2003 +0000
+++ b/Objects/unicodeobject.c	Sun Mar 09 07:30:43 2003 +0000
@@ -276,6 +276,7 @@
 	    return -1;
 	Py_UNICODE_COPY(w->str, v->str,
 			length < v->length ? length : v->length);
+	Py_DECREF(*unicode);
 	*unicode = (PyObject *)w;
 	return 0;
     }