Changeset 21668 in vbox for trunk/src/VBox/GuestHost/OpenGL/util
- Timestamp:
- Jul 17, 2009 9:45:16 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50214
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/hash.c
r15532 r21668 316 316 { 317 317 int i; 318 CRHashNode *entry, *next; 318 319 319 320 if ( !hash) return; … … 325 326 for ( i = 0; i < CR_NUM_BUCKETS; i++ ) 326 327 { 327 if ( hash->buckets[i] ) 328 { 329 if (hash->buckets[i]->data && deleteFunc) { 330 /* Clear the key in case crHashtableDelete() is called 331 * from this callback. 332 */ 333 hash->buckets[i]->key = 0; 334 (*deleteFunc)( hash->buckets[i]->data ); 335 } 336 crFree( hash->buckets[i] ); 328 entry = hash->buckets[i]; 329 while (entry) 330 { 331 next = entry->next; 332 /* Clear the key in case crHashtableDelete() is called 333 * from this callback. 334 */ 335 entry->key = 0; 336 if (deleteFunc && entry->data) 337 { 338 (*deleteFunc)(entry->data); 339 } 340 crFree(entry); 341 entry = next; 342 337 343 } 338 344 }
Note:
See TracChangeset
for help on using the changeset viewer.