free fp ecc resources on cleanup

This commit is contained in:
toddouska 2013-09-06 17:08:57 -07:00
parent 6e05d4317f
commit 44ba0af192
3 changed files with 8 additions and 0 deletions

View File

@ -1512,6 +1512,7 @@ echo " * RSA: $ENABLED_RSA"
echo " * DSA: $ENABLED_DSA"
echo " * DH: $ENABLED_DH"
echo " * ECC: $ENABLED_ECC"
echo " * FPECC: $ENABLED_FPECC"
echo " * ASN: $ENABLED_ASN"
echo " * CODING: $ENABLED_CODING"
echo " * MEMORY: $ENABLED_MEMORY"

View File

@ -3440,6 +3440,9 @@ void ecc_fp_free(void)
if (LockMutex(&ecc_fp_lock) == 0) {
ecc_fp_free_cache();
UnLockMutex(&ecc_fp_lock);
FreeMutex(&ecc_fp_lock);
initMutex = 0;
}
}

View File

@ -4482,6 +4482,10 @@ int CyaSSL_Cleanup(void)
if (FreeMutex(&count_mutex) != 0)
ret = BAD_MUTEX_E;
#if defined(HAVE_ECC) && defined(FP_ECC)
ecc_fp_free();
#endif
return ret;
}