Fixes a memory leak when using openssl backend caused by mismatched calls to EVP_DigestInit and EVP_DigestFinal_ex.