diff options
author | Guido van Rossum <guido@python.org> | 2000-10-03 18:09:04 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-10-03 18:09:04 (GMT) |
commit | 4ae8ef84da19892b828b9649a9565e967be4c0bd (patch) | |
tree | 94caa0826efe5e3e2f3f3f80767abfbe5f9a9b7c | |
parent | 1319e3ecbc67b172d4f712941d8a93ce61e14dd3 (diff) | |
download | cpython-4ae8ef84da19892b828b9649a9565e967be4c0bd.zip cpython-4ae8ef84da19892b828b9649a9565e967be4c0bd.tar.gz cpython-4ae8ef84da19892b828b9649a9565e967be4c0bd.tar.bz2 |
In _PyUnicode_Fini(), decref unicode_empty before tearng down the free
list. Discovered by Barry, fix approved by MAL.
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b096faa..8d04b2d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5225,6 +5225,8 @@ _PyUnicode_Fini(void) { PyUnicodeObject *u = unicode_freelist; + Py_XDECREF(unicode_empty); + unicode_empty = NULL; while (u != NULL) { PyUnicodeObject *v = u; u = *(PyUnicodeObject **)u; @@ -5235,6 +5237,4 @@ _PyUnicode_Fini(void) } unicode_freelist = NULL; unicode_freelist_size = 0; - Py_XDECREF(unicode_empty); - unicode_empty = NULL; } |