Ignore:
Timestamp:
Jul 14, 2008 4:58:11 PM (16 years ago)
Author:
bennylp
Message:

Ticket #568: The hash table ignores the last row of the table in hash table iteration, causing some memory leaks during shutdown routine because some objects are not destroyed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/hash.c

    r2039 r2138  
    277277    it->entry = NULL; 
    278278 
    279     for (; it->index < ht->rows; ++it->index) { 
     279    for (; it->index <= ht->rows; ++it->index) { 
    280280        it->entry = ht->table[it->index]; 
    281281        if (it->entry) { 
     
    295295    } 
    296296 
    297     for (++it->index; it->index < ht->rows; ++it->index) { 
     297    for (++it->index; it->index <= ht->rows; ++it->index) { 
    298298        it->entry = ht->table[it->index]; 
    299299        if (it->entry) { 
     
    320320    int len, totlen = 0; 
    321321 
    322     for (i=0; i<ht->rows; ++i) { 
     322    for (i=0; i<=ht->rows; ++i) { 
    323323        unsigned count = 0;     
    324324        pj_hash_entry *entry = ht->table[i]; 
Note: See TracChangeset for help on using the changeset viewer.