src/components/pcp/linux-pcp.c
//-----------------------------------------------------------------------------
// freeNameHash: delete any allocated for collisions.
//-----------------------------------------------------------------------------
delete any allocated for collisions.
delete any allocated for collisions .
static void freeNameHash(void) 
{
   int i;
   for (i=0; i<HASH_SIZE; i++) {                                         
      void *next = sNameHash[i].next;                                    
      while (next != NULL) {                                             
         void *tofree = next;                                            
         next = ((_pcp_hash_t*) next)->next;                             
         free(tofree);                                                   
      } 
   }
}
static void freeNameHash ( void ) { int i ; for ( i = 0 ; i < HASH_SIZE ; i ++ ) { void * next = sNameHash [ i ] . next ; while ( next != NULL ) { void * tofree = next ; next = ( ( _pcp_hash_t * ) next ) -> next ; free ( tofree ) ; } } }
freeNameHash: delete any allocated for collisions.
freeNameHash : delete any allocated for collisions .
// loop through table. // Get any pointer. // follow the chain. // remember what we have to free. // follow the chain. // free the one we are standing on.