free(P)
returns to he global pool the block of memory
that P
points to.
To free up all the entries in a linked list, you must call
free
for each entry. Calling it on the first
entry does not free up the following entries.
"MARYJANE"
's entry because we
forgot to retrieve its address from "JOE"
's entry before
we freed it.