# HG changeset patch # User Eric Wing # Date 1289041168 25200 # Node ID 038baa026db352e9b3dc08a759b22bc43788806a # Parent b27f7ff5e44bb11b57e61cc4d8b2582e4e0331ca Fixed bug in LinkedList delete. Shouldn't have both popped list and then called FreeData which would check the list again for the data. Instead, I should just get the data and then call FreeData to let it manipulate the list. diff -r b27f7ff5e44b -r 038baa026db3 ALmixer.c --- a/ALmixer.c Sat Nov 06 03:25:25 2010 -0700 +++ b/ALmixer.c Sat Nov 06 03:59:28 2010 -0700 @@ -7171,7 +7171,8 @@ */ while(LinkedList_Size(s_listOfALmixerData) > 0) { - ALmixer_Data* almixer_data = LinkedList_PopBack(s_listOfALmixerData); + /* Note that ALmixer_FreeData will remove the data from the linked list for us so don't pop the list here. */ + ALmixer_Data* almixer_data = LinkedList_Back(s_listOfALmixerData); ALmixer_FreeData(almixer_data); } LinkedList_Free(s_listOfALmixerData);