How to query cpg of this code to find the location of un-free memory ?
int bad(void) {
OutsideType my;
my.p = MyAlloc();
my.p = MyAlloc();
MyFree(my.p);
return 0;
}
Try using joern to find the place where the free function is called.