RFR: 8320219: Actually resolve issues with goto labels in sspi [v7]

Julian Waters jwaters at openjdk.org
Fri Jan 19 01:40:29 UTC 2024


On Tue, 16 Jan 2024 17:36:20 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix the remaining case in sspi.cpp
>
> src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp line 422:
> 
>> 420:     gss_name_struct* name = new gss_name_struct;
>> 421:     if (name == nullptr) {
>> 422:         goto err;
> 
> Go back? This looks more evil to me. Can we just `delete` and `return` here?

I left it in there since it seemed inconsistent to have one site return while the rest used goto, I can replace it if needed

> src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp line 543:
> 
>> 541:         delete[] fullname;
>> 542:     }
>> 543:     goto finish;
> 
> Instead of `goto finish`, can we `return` here?

Will do, thanks

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16682#discussion_r1458178608
PR Review Comment: https://git.openjdk.org/jdk/pull/16682#discussion_r1458178889



More information about the security-dev mailing list