1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

Fix bad use when freeing linked list. Todd Stecher (Original author) please check !

Jeremy.
This commit is contained in:
Jeremy Allison 2010-02-10 16:23:33 -08:00
parent 91cb7b7c60
commit ed0e0a2005

View File

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