In _PyUnicode_Fini(), decref unicode_empty before tearng down the free

list.  Discovered by Barry, fix approved by MAL.
This commit is contained in:
Guido van Rossum 2000-10-03 18:09:04 +00:00
parent 1319e3ecbc
commit 4ae8ef84da
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}