summaryrefslogtreecommitdiffstats
path: root/crypto/cmac/cm_ameth.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cmac/cm_ameth.c')
-rw-r--r--crypto/cmac/cm_ameth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cmac/cm_ameth.c b/crypto/cmac/cm_ameth.c
index 223631c3c0..d9a550e72b 100644
--- a/crypto/cmac/cm_ameth.c
+++ b/crypto/cmac/cm_ameth.c
@@ -69,7 +69,7 @@ static int cmac_size(const EVP_PKEY *pkey)
static void cmac_key_free(EVP_PKEY *pkey)
{
- CMAC_CTX *cmctx = (CMAC_CTX *)pkey->pkey.ptr;
+ CMAC_CTX *cmctx = EVP_PKEY_get0(pkey);
CMAC_CTX_free(cmctx);
}