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