Blob Blame History Raw
From fc9d3560b4a84bab784574cfe9700125065713c3 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Sat, 22 Dec 2018 15:06:18 -0500
Subject: [PATCH 4/7] Use HMAC_CTX_free() instead of free() on a HMAC_CTX*
 (#34222)

This is a leftover from before the OpenSSL 1.0/1.1 hybridization. There
was no HMAC_CTX_free() in 1.0.

Fixes #34210
---
 .../Unix/System.Security.Cryptography.Native/pal_hmac.cpp       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Native/Unix/System.Security.Cryptography.Native/pal_hmac.cpp b/src/Native/Unix/System.Security.Cryptography.Native/pal_hmac.cpp
index 539dc07683..979750cb40 100644
--- a/src/Native/Unix/System.Security.Cryptography.Native/pal_hmac.cpp
+++ b/src/Native/Unix/System.Security.Cryptography.Native/pal_hmac.cpp
@@ -31,7 +31,7 @@ extern "C" HMAC_CTX* CryptoNative_HmacCreate(const uint8_t* key, int32_t keyLen,
 
     if (!ret)
     {
-        free(ctx);
+        HMAC_CTX_free(ctx);
         return nullptr;
     }
 
-- 
2.20.1