Use EVP_MD_CTX_destroy() instead of _free().