From a0ae8a588e0f73a69ba4772db7073c05d6356e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 15 Oct 2006 10:39:05 +0000 Subject: [PATCH] (HMAC_CTX_cleanup): destroy the EVP_MD_CTX, so it will be freed. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18470 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/hmac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/des/hmac.c b/lib/des/hmac.c index 1d323b372..848b987a9 100644 --- a/lib/des/hmac.c +++ b/lib/des/hmac.c @@ -28,7 +28,10 @@ HMAC_CTX_cleanup(HMAC_CTX *ctx) free(ctx->ipad); ctx->ipad = NULL; } - EVP_MD_CTX_cleanup(ctx->ctx); + if (ctx->ctx) { + EVP_MD_CTX_destroy(ctx->ctx); + ctx->ctx = NULL; + } } size_t