//dostuff(p);
If I run cppcheck, it indicates no memory leaks which is incorrect as "p" variable is never allocated.
However, if I comment out the try catch block, cppcheck works correct;ly.
If I run the same sample without try-catch block, it shows
error: Memory leak: p[memleak]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have the following simple code:
void test()
{
//dostuff(p);
If I run cppcheck, it indicates no memory leaks which is incorrect as "p" variable is never allocated.
However, if I comment out the try catch block, cppcheck works correct;ly.
If I run the same sample without try-catch block, it shows
error: Memory leak: p[memleak]