On Fri, 15 Apr 2022 08:25:40 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Don't use lambda in cleaner
>
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java 
> line 235:
> 
>> 233:                 this.password = password.clone();
>> 234:                 P11Util.cleaner.register(this,
>> 235:                         () -> Arrays.fill(this.password, ' '));
> 
> This lambda most probably capture `this` so it will create a leak.

I was wondering to fix it in another PR as there is another issue in the block. 
 Better to fix it sooner.

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

PR: https://git.openjdk.java.net/jdk/pull/8248

Reply via email to