Skip to content

Commit 7199341

Browse files
committed
JCE: add missing aesCtr/aesOfb cleanup in WolfCryptCipher.finalize() (F-1520)
1 parent 56b795a commit 7199341

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/main/java/com/wolfssl/provider/jce/WolfCryptCipher.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,6 +1987,16 @@ protected void finalize() throws Throwable {
19871987
this.aesEcb = null;
19881988
}
19891989

1990+
if (this.aesCtr != null) {
1991+
this.aesCtr.releaseNativeStruct();
1992+
this.aesCtr = null;
1993+
}
1994+
1995+
if (this.aesOfb != null) {
1996+
this.aesOfb.releaseNativeStruct();
1997+
this.aesOfb = null;
1998+
}
1999+
19902000
if (this.aesGcm != null) {
19912001
this.aesGcm.releaseNativeStruct();
19922002
this.aesGcm = null;

0 commit comments

Comments
 (0)