forked from wolfSSL/wolfssl
Fix for ECC curve cache without custom curves enabled.
This commit is contained in:
@ -1304,15 +1304,13 @@ static void wc_ecc_curve_free(ecc_curve_spec* curve)
|
|||||||
{
|
{
|
||||||
if (curve) {
|
if (curve) {
|
||||||
#ifdef ECC_CACHE_CURVE
|
#ifdef ECC_CACHE_CURVE
|
||||||
/* only free custom curves (reset are globally cached) */
|
|
||||||
if (curve->dp
|
|
||||||
#ifdef WOLFSSL_CUSTOM_CURVES
|
#ifdef WOLFSSL_CUSTOM_CURVES
|
||||||
&& curve->dp->id == ECC_CURVE_CUSTOM
|
/* only free custom curves (reset are globally cached) */
|
||||||
#endif
|
if (curve->dp && curve->dp->id == ECC_CURVE_CUSTOM) {
|
||||||
) {
|
|
||||||
wc_ecc_curve_cache_free_spec(curve);
|
wc_ecc_curve_cache_free_spec(curve);
|
||||||
XFREE(curve, NULL, DYNAMIC_TYPE_ECC);
|
XFREE(curve, NULL, DYNAMIC_TYPE_ECC);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
wc_ecc_curve_cache_free_spec(curve);
|
wc_ecc_curve_cache_free_spec(curve);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user