Skip to content

Commit 0809300

Browse files
Fix PQC signature context memory leak (#923)
During PQC signature operations a context is created and never released. Fixes: #911 Signed-off-by: Jason Katonica <[email protected]>
1 parent 903ca4d commit 0809300

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/native/SignaturePQC.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ Java_com_ibm_crypto_plus_provider_ock_NativeInterface_PQC_1SIGNATURE_1sign(
119119
}
120120
}
121121

122+
if (skc != NULL) {
123+
ICC_EVP_PKEY_CTX_free(ockCtx, skc);
124+
skc = NULL;
125+
}
122126
if (sigBytesLocal != NULL) {
123127
free(sigBytesLocal);
124128
sigBytesLocal = NULL;

0 commit comments

Comments
 (0)