diff options
author | relyea%netscape.com <devnull@localhost> | 2002-03-01 02:13:42 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2002-03-01 02:13:42 +0000 |
commit | a5222f8d87268fdfe01f1739dcd7264f0167ea21 (patch) | |
tree | 6315c301ee733ebdbeb896fd59841f94b778361b | |
parent | f2b4eaaa5c1aeef54f56ec5185134133b32e02d9 (diff) | |
download | nss-hg-a5222f8d87268fdfe01f1739dcd7264f0167ea21.tar.gz |
When we free the clists, clear out our head pointer (don't keep pointing to
freed memory);
-rw-r--r-- | security/nss/lib/base/list.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/nss/lib/base/list.c b/security/nss/lib/base/list.c index 89aadf283..ae7375a91 100644 --- a/security/nss/lib/base/list.c +++ b/security/nss/lib/base/list.c @@ -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; |