SyntaxFix
Write A Post
Hire A Developer
Questions
One function can do the job,
void free_list(node *pHead) { node *pNode = pHead, *pNext; while (NULL != pNode) { pNext = pNode->next; free(pNode); pNode = pNext; } }