DEBUG(0,("##### Dumping Performance Counters #####\n"));
- for (i=0; i < 256; i++) {
- for (head = g_list[i]; head != NULL; head = head->next) {
- perfcount_test_dump_counter(head, 0);
- SAFE_FREE(DLIST_PREV(head));
- }
- SAFE_FREE(head);
+ for (i=0; i < MAX_OP; i++) {
+ struct perfcount_test_counter *next;
+ for (head = g_list[i]; head != NULL; head = next) {
+ next = head->next;
+ perfcount_test_dump_counter(head, 0);
+ SAFE_FREE(head);
+ }
+ g_list[i] = NULL;
}
}