for example if you have a struct:
struct node {
int data;
struct node* next;
};
We must free memory for the node that has constant memory or a multiple of itself:
struct node* new_node = malloc(sizeof(struct node));
In a file containing the previous struct, we define the head:
Node* head = NULL;
The head is the first node and then they are linked there.
No memory is released for the head, but for the nodes it is.