mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8268525: Some new memory leak after JDK-8248268 and JDK-8255557
Reviewed-by: valeriep, ascarpino
This commit is contained in:
parent
53b6e2c85c
commit
7b2e7d8bab
5 changed files with 91 additions and 108 deletions
|
@ -163,7 +163,13 @@ abstract class GaloisCounterMode extends CipherSpi {
|
|||
reInit = false;
|
||||
|
||||
// always encrypt mode for embedded cipher
|
||||
blockCipher.init(false, key.getAlgorithm(), keyValue);
|
||||
try {
|
||||
blockCipher.init(false, key.getAlgorithm(), keyValue);
|
||||
} finally {
|
||||
if (!encryption) {
|
||||
Arrays.fill(keyValue, (byte) 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue