As Blue Moon pointed out in his answer, one of the main features of C compared to other languages is the missing memory management. While this gives you a lot of freedom it can on the other hand lead to severe bugs in your code.
Technically the detection of memory leaks is not possible with a confidence level of 100%, but there are quite powerful static code analyzers out there to guide you.
In the last embedded project I worked on we used FlexeLint. It is costly for non-commercial products but the benefit is enormours. A lot of potential bugs and leaks could be detected with such a static analyzer without even executing the code.
There is another static analyzer, free of cost for open source projects called Coverity Scan. I did not try it myself but it is probably worth a shot.
After witnessing what a good analyzer like FlexeLint is able to detect beyond mere compilation errors, I personally would not launch another C Project without such analyzis tools in place.
While this is not a direct answer to your question, it can be an improvement to your workflow because such errors as forgetting a free call will be detected in most cases.
freemanually.