Fix scan-build warning with err not being read with HAVE_COMP_KEY defined. Okay to always call wc_ecc_curve_free, since DECLARE_CURVE_SPECS does a memset.

This commit is contained in:
David Garske
2017-01-18 14:05:32 -08:00
parent 31981cc365
commit b3721c6808

View File

@ -3901,6 +3901,7 @@ int wc_ecc_import_point_der(byte* in, word32 inLen, const int curve_idx,
did_init = 1;
/* load curve info */
if (err == MP_OKAY)
err = wc_ecc_curve_load(&ecc_sets[curve_idx], &curve,
(ECC_CURVE_FIELD_PRIME | ECC_CURVE_FIELD_AF | ECC_CURVE_FIELD_BF));
@ -3940,10 +3941,10 @@ int wc_ecc_import_point_der(byte* in, word32 inLen, const int curve_idx,
mp_clear(&t2);
mp_clear(&t1);
#endif
}
wc_ecc_curve_free(curve);
}
}
#endif
if (err == MP_OKAY && compressed == 0)