Perhaps you are after IAR's C-RUN runtime heap analysis. It automatically instruments the code so that preventable leaks can be detected on the fly.
It is available as an add-on though there is a trial version as well.
https://github.com/iarsystems/crun-evaluation-guide?tab=readme-ov-file#heap-checking-capabilities