Well, sorry, I should have expanded my comment.

What I meant is that you allocated the size of a few `int`s on the heap for the `filenames` variable, but didn't give them back to the kernel prior to the program termination.

Just as a side note, people usually debate on whether these kinds of allocations should have explicit `free` calls, since on process termination the kernel will reclaim any memory reserved to the process anyway. The tradeoffs however, reside on the ability of performing good memory analysis via `malloc` debugging and profiler tools - such as Valgrind -, which would point these harmless memory leaks intermixed with real, more serious leaks _vs._ not having to manually free these blocks, which could clutter the code since it requires a number of repetitive `free` calls.

Particularly, I'm on the explicit `free` calls team and it might be good for us to get the habit of freeing heap objects we allocate if we are going to follow this route. However, if you omitted the call on purpose, that's totally acceptable as well, since this is a completely harmless leak. :+1: 

(Sorry for the long answer, started writing and just couldn't stop my hands from typing :runner: )