wrote:
Do we have any tool that can fix memory leaks automatically at compile time?
No, you need to fix them yourself.
wrote:
Detecting memory leak in C at compile time, is it possible?
There are tools you can buy that attempt to fix them, but they work at run time. A compile time tool would be quite a feat, it would have to track all the possible paths of operation as it compiles.