in Tutorials/MemoryUsage/Stage1/main.c [192:206]
static void DeleteList(Node **headNode)
{
Log_Debug("Delete the linked list.\n");
Node *currentNode = *headNode;
while (currentNode != NULL) {
Node *nextNode = currentNode->next;
free(currentNode->userData);
free(currentNode);
currentNode = nextNode;
}
*headNode = NULL;
listSize = 0;
}