From f2c8826e16e84acdf00df489b04637a9b0449beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Guimar=C3=A3es?= Date: Mon, 23 Jun 2014 15:28:57 -0300 Subject: [PATCH] fix missing FreeRsaKey on error. --- ctaocrypt/src/pkcs7.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctaocrypt/src/pkcs7.c b/ctaocrypt/src/pkcs7.c index df6ba61f2..9e3706da0 100644 --- a/ctaocrypt/src/pkcs7.c +++ b/ctaocrypt/src/pkcs7.c @@ -1075,6 +1075,7 @@ CYASSL_LOCAL int CreateRecipientInfo(const byte* cert, word32 certSz, if (RsaPublicKeyDecode(decoded->publicKey, &idx, pubKey, decoded->pubKeySize) < 0) { CYASSL_MSG("ASN RSA key decode error"); + FreeRsaKey(pubKey); FreeDecodedCert(decoded); #ifdef CYASSL_SMALL_STACK XFREE(pubKey, NULL, DYNAMIC_TYPE_TMP_BUFFER);