Use EVP_MD_CTX_destroy() instead of _free().
authorGuus Sliepen <guus@tinc-vpn.org>
Wed, 22 Jun 2016 21:08:30 +0000 (23:08 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Wed, 22 Jun 2016 21:08:30 +0000 (23:08 +0200)
Thanks to azrdev for pointing out the build failure on Fedora 23.

src/openssl/digest.c

index 135e7e6..c303785 100644 (file)
@@ -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);