fix comment and remove duplicate free

pull/1728/head
Jacob Barthelmeh 2018-08-03 15:04:37 -06:00
parent ce5e787afc
commit 7726786998
3 changed files with 3 additions and 3 deletions

View File

@ -840,7 +840,6 @@ int wc_HashFree(wc_HashAlg* hash, enum wc_HashType type)
}
wc_Sha256Free(sha256);
}
wc_Sha256Free(sha256);
#ifdef WOLFSSL_SMALL_STACK

View File

@ -64,6 +64,7 @@ int wc_InitSha256_ex(wc_Sha256* sha, void* heap, int devId)
sha->rdFd = wc_Afalg_CreateRead(sha->alFd, WC_TYPE_HASH, WC_NAME_SHA256);
if (sha->rdFd < 0) {
close(sha->alFd);
return WC_AFALG_SOCK_E;
}

View File

@ -2578,8 +2578,8 @@ SHA256_NOINLINE static int Transform_Sha256_AVX2_RORX_Len(wc_Sha256* sha256,
#elif defined(WOLFSSL_IMX6_CAAM) && !defined(NO_IMX6_CAAM_HASH)
/* functions defined in wolfcrypt/src/port/caam/caam_sha256.c */
//#elif defined(WOLFSSL_AFALG_HASH)
// /* implemented in wolfcrypt/src/port/af_alg/afalg_hash.c */
#elif defined(WOLFSSL_AFALG_HASH)
#error SHA224 currently not supported with AF_ALG enabled
#else