SyntaxFix
Write A Post
Hire A Developer
Questions
Simply by iterating over the list:
struct node *n = head; while(n){ struct node *n1 = n; n = n->next; free(n1); }