From c1215aa93b3790d4aba1986c8530b2c0f546a77d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 22:42:19 +0000 Subject: [PATCH] Fix wc_MlKemKey_Free to return int instead of void Co-Authored-By: sean@wolfssl.com --- wolfcrypt/src/wc_mlkem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/wc_mlkem.c b/wolfcrypt/src/wc_mlkem.c index b76f75e53..e8f1580fa 100644 --- a/wolfcrypt/src/wc_mlkem.c +++ b/wolfcrypt/src/wc_mlkem.c @@ -227,8 +227,9 @@ int wc_MlKemKey_Init(MlKemKey* key, int type, void* heap, int devId) * Free the Kyber key object. * * @param [in, out] key Kyber key object to dispose of. + * @return 0 on success. */ -void wc_MlKemKey_Free(MlKemKey* key) +int wc_MlKemKey_Free(MlKemKey* key) { if (key != NULL) { /* Dispose of PRF object. */ @@ -241,6 +242,8 @@ void wc_MlKemKey_Free(MlKemKey* key) ForceZero(key->priv, sizeof(key->priv)); ForceZero(key->z, sizeof(key->z)); } + + return 0; } /******************************************************************************/