On Fri, 27 Mar 2026 16:49:19 GMT, Weijun Wang <[email protected]> wrote:
> For gotos on lines 352 and 359, shall we still release the certificate?
I am not sure, seems the certificate in transfered later to the Java side.
See
if (i == 0)
currCertRef = certificate;
else
currCertRef =
(SecCertificateRef)CFArrayGetValueAtIndex(certChain, i);
...
jlong certRefElement = ptr_to_jlong(currCertRef);
(*env)->SetLongArrayRegion(env, certRefArray, i, 1,
&certRefElement);
so I am not sure if we should CFRelease it on lines 352 and 359 .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29821#issuecomment-4236364018