On Tue, 29 Sep 2026 15:33:45 GMT, Matthias Baesken <[email protected]> wrote:
>> src/java.base/windows/native/libnet/NTLMAuthSequence.c line 145:
>>
>>> 143: return (jlong) pCred;
>>> 144: } else {
>>> 145: if (pCred != NULL) free(pCred);
>>
>> the NULL check is not necessary, `free` checks for NULL too.
>
> You are right, we can remove the check.
>
> But looking at the codebase
> https://github.com/search?q=repo%3Aopenjdk%2Fjdk+%22%29+free%28%22&type=code
> we seem not to trust free and still NULL-check at a lot of places; should we
> change this ?
I think we should. It doesn't add value.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33070#discussion_r4137627994