When a function allocates memory, one helpful convention is to decorate the function in some way so that you remember to free it. Here is one example



#include <stdio.h>
#include <stdlib.h>...