I have this code -
#include <stdlib.h> static void test(int **); int main() { int *ptr = NULL; ptr = malloc(100); test(&ptr); return 0; } static void test(int **ptr) { // free(*ptr); }
cppcheck doesn't report a memory leak, not sure why not - am i missing anything here ?
Thanks Siddharth
Thanks! I created https://trac.cppcheck.net/ticket/8980
Log in to post a comment.
I have this code -
cppcheck doesn't report a memory leak, not sure why not - am i missing anything here ?
Thanks
Siddharth
Last edit: Siddharth 2019-02-13
Last edit: Siddharth 2019-02-13
Thanks! I created https://trac.cppcheck.net/ticket/8980