Fix i2d_RSAPublicKey() memory leak issue.

This commit is contained in:
Go Hosohara
2018-07-11 15:24:25 +09:00
parent 3f993c280c
commit 19c1a3a3f9

View File

@ -28484,6 +28484,9 @@ int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, const unsigned char **pp)
}
if((pp != NULL) && (ret >= 0))
*pp = der;
else
XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return ret;
}
#endif /* #if !defined(HAVE_FAST_RSA) */