File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7886,15 +7886,23 @@ void wc_ecc_free_curve(const ecc_set_type* curve, void* heap)
78867886WOLFSSL_ABI
78877887int wc_ecc_free(ecc_key* key)
78887888{
7889+ #if defined(WOLF_CRYPTO_CB) && defined(WOLF_CRYPTO_CB_FREE)
7890+ int ret;
7891+ #endif
7892+
78897893 if (key == NULL) {
78907894 return 0;
78917895 }
78927896
78937897#if defined(WOLF_CRYPTO_CB) && defined(WOLF_CRYPTO_CB_FREE)
78947898 if (key->devId != INVALID_DEVID) {
7895- wc_CryptoCb_Free(key->devId, WC_ALGO_TYPE_PK,
7899+ ret = wc_CryptoCb_Free(key->devId, WC_ALGO_TYPE_PK,
78967900 WC_PK_TYPE_EC_KEYGEN, 0, key);
7901+ if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE))
7902+ return ret;
7903+ /* fall-through to software cleanup */
78977904 }
7905+ (void)ret;
78987906#endif
78997907
79007908#if defined(WOLFSSL_ECDSA_SET_K) || defined(WOLFSSL_ECDSA_SET_K_ONE_LOOP) || \
You can’t perform that action at this time.
0 commit comments