From: Guus Sliepen Date: Wed, 22 Jun 2016 21:08:30 +0000 (+0200) Subject: Use EVP_MD_CTX_destroy() instead of _free(). X-Git-Tag: release-1.1pre15~65 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=2de5d866b5e4d4e6b827dcfb985c24edbda71f4f;p=tinc Use EVP_MD_CTX_destroy() instead of _free(). Thanks to azrdev for pointing out the build failure on Fedora 23. --- diff --git a/src/openssl/digest.c b/src/openssl/digest.c index 135e7e69..c303785d 100644 --- a/src/openssl/digest.c +++ b/src/openssl/digest.c @@ -101,11 +101,11 @@ bool digest_create(digest_t *digest, const void *indata, size_t inlen, void *out || !EVP_DigestUpdate(ctx, indata, inlen) || !EVP_DigestFinal(ctx, tmpdata, NULL)) { logger(DEBUG_ALWAYS, LOG_DEBUG, "Error creating digest: %s", ERR_error_string(ERR_get_error(), NULL)); - EVP_MD_CTX_free(ctx); + EVP_MD_CTX_destroy(ctx); return false; } - EVP_MD_CTX_free(ctx); + EVP_MD_CTX_destroy(ctx); } memcpy(outdata, tmpdata, digest->maclength);