fix missing FreeRsaKey on error.

This commit is contained in:
Moisés Guimarães 2014-06-23 15:28:57 -03:00
parent edb94557e9
commit f2c8826e16

View File

@ -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);