I am writing a cfg library to test pam usage on Linux. The pam_start function allocates memory in a pointer to a pointer as its fourth argument. This is very similar to the gettaddrinfo function found in posix.cfg. If I test the getaddrinfo leak detection with the following code:
It does not report the memory leak as ai goes out of scope. Looking at the source code to cppcheck, it appears that "arg" is parsed in the "alloc" xml parser. Is this a feature that is still under development?
Best Regards,
-Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am writing a cfg library to test pam usage on Linux. The pam_start function allocates memory in a pointer to a pointer as its fourth argument. This is very similar to the gettaddrinfo function found in posix.cfg. If I test the getaddrinfo leak detection with the following code:
It does not report the memory leak as ai goes out of scope. Looking at the source code to cppcheck, it appears that "arg" is parsed in the "alloc" xml parser. Is this a feature that is still under development?
Best Regards,
-Steve
This really seems to not work at the moment.
See also this thread: https://sourceforge.net/p/cppcheck/discussion/general/thread/d9737d5d/