I\'m investigating a memory leak and from what I see, the problem looks like this:
int main(){ char *cp = 0; func(cp); //code delete[] cp; } voi
You're passing in cbuf, not cp.
cbuf
cp