Closed EJP286CRSKW closed 6 months ago
You are saying that the leak is because the release string is skipped if it fails because the throw()
exits the function before ReleaseString
is called?
Ugh. I'll have to look at putting my dev environment back together.
How did you find this?
The ReleaseStringUTFChars()
is skipped because of the premature return NULL;
in the failure block.
I found it by reading the code.
I think
HRESULT hr = name2ID(pIDispatch, nm, (long *)&dispID, lcid));
Should be
HRESULT hr = name2ID(pIDispatch, nm, (long *)&dispID, lcid);
https://github.com/freemansoft/jacob-project/commit/585338153351d24bb17afae4c2402cd143f1362f
Correct, well spotted.
There is a memory leak around the call to name2ID(), in the case where it fails. Code reads:
It should read: