From 25b72497d89ad7be16e410475463db9e24ce59f8 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 21 Jun 2024 14:04:32 -0500 Subject: [PATCH] wolfcrypt/src/dilithium.c: add missing OQS_SIG_free() in oqs_dilithium_make_key() (liboqs wrapper). --- wolfcrypt/src/dilithium.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/src/dilithium.c b/wolfcrypt/src/dilithium.c index fcd7b9d7d2..4539ed9aad 100644 --- a/wolfcrypt/src/dilithium.c +++ b/wolfcrypt/src/dilithium.c @@ -5427,6 +5427,10 @@ static int oqs_dilithium_make_key(dilithium_key* key, WC_RNG* rng) key->pubKeySet = 1; } + if (oqssig != NULL) { + OQS_SIG_free(oqssig); + } + return ret; } #endif /* WOLFSSL_DILITHIUM_NO_MAKE_KEY */