while (pList)
{
struct Node *temp = pList->next;
free(pList);
pList = temp;
}
First iteration:
temp = pList->next;
![]()
free(pList);
![]()
pList = temp;
![]()
Second iteration:
temp = pList->next;
![]()
free(pList);
![]()
pList = temp;
![]()
Third iteration:
temp = pList->next;
![]()
free(pList);
![]()
pList = temp;
![]()
End of while loop.