зеркало из https://github.com/mozilla/gecko-dev.git
Fix memory leak in hash table keys. Hash tables stay around forever.
keys go into and out of the table. the old code allocated the keys from the hash table's arena, so they would grow without bounds. Now the keys are allocated from the heap, and get freed when they are expunged from the table.
This commit is contained in:
Родитель
2e844c5b23
Коммит
89fbd30151
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: hashops.c,v $ $Revision: 1.2 $ $Date: 2001/01/31 18:01:45 $ $Name: $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: hashops.c,v $ $Revision: 1.3 $ $Date: 2002/02/06 02:42:08 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
|
@ -82,7 +82,7 @@ nss_arena_hash_alloc_entry
|
|||
const void *key
|
||||
)
|
||||
{
|
||||
NSSArena *arena = (NSSArena *)pool;
|
||||
NSSArena *arena = NULL;
|
||||
|
||||
#ifdef NSSDEBUG
|
||||
if( (void *)NULL != arena ) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче