When we free the clists, clear out our head pointer (don't keep pointing to

freed memory);
This commit is contained in:
relyea%netscape.com 2002-03-01 02:13:42 +00:00
Родитель ebc48d2fa1
Коммит 39c2b9d38b
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -32,7 +32,7 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: list.c,v $ $Revision: 1.14 $ $Date: 2002/02/05 22:08:12 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: list.c,v $ $Revision: 1.15 $ $Date: 2002/03/01 02:13:42 $ $Name: $";
#endif /* DEBUG */
/*
@ -189,6 +189,7 @@ nssList_Clear(nssList *list, nssListElementDestructorFunc destructor)
nssListElement *node, *tmp;
NSSLIST_LOCK_IF(list);
node = list->head;
list->head = NULL;
while (node && list->count > 0) {
if (destructor) (*destructor)(node->data);
link = &node->link;