From 4858a6598419bce0773aef401bf40d68ab7e237f Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Wed, 24 Feb 2016 14:42:07 -0700 Subject: [PATCH] Always execute wc_InitRsaKey if we are always going to execute wc_FreeRsaKey --- wolfcrypt/src/asn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 567f26820..b7ff7855f 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -3590,7 +3590,8 @@ static int ConfirmSignature(const byte* buf, word32 bufSz, if (sigSz > MAX_ENCODED_SIG_SZ) { WOLFSSL_MSG("Verify Signature is too big"); } - else if (wc_InitRsaKey(pubKey, heap) != 0) { + + if (wc_InitRsaKey(pubKey, heap) != 0) { WOLFSSL_MSG("InitRsaKey failed"); } else if (wc_RsaPublicKeyDecode(key, &idx, pubKey, keySz) < 0) {