This question already has an answer here:
Is necessary to do a free(string) before end a program?
To ensure your software doesn't have any memory leaks, yes, you should call
free for any memory that you have allocated dynamically.
Memory will be reclaimed by the OS when the process terminates, and so it doesn't matter much unless you are running low on available memory. However, using
free to release memory is very important if you're writing software that will run in the background, such as a daemon process.
It is recommended (almost universally) that the Right Way (tm) is to
free your memory and not to rely on the OS to reclaim that space.
It is not necessary.
There are some good reasons to, as described in another answer. But there are also some reasons not to: the code to do the freeing takes extra time to write, debug, and maintain, and is an extra potential source of bugs.
It's not possible to give a universal answer that you should or shouldn't: it's a choice that each project has to make, depending on its own circumstances.