I have been having trouble developing a function that frees all of the memory associated with structs of a linked list. Im not asking for a clear cut answer, just an idea or a function that can aid.
F.Y.I. the linked list contains a head struct and a tail struct to identify the
Here's some code that might spark some thought:
void deleteAllStructs(void){
struct structTypeName listingPtr;
do{
for(listingPtr=gHead;listingPtr->next!=NULL;listingPtr=listingPtr->next)
;
listingPtr = NULL;
while(gHead!=NULL);
}