From 69e755892ab68c42cfc04f43c3b2ee0d0f29264d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 16 Oct 2006 10:51:23 +0000 Subject: r19325: leak fix from lha (This used to be commit 248f3265e6339f279691be5d17ca4ce733c6590d) --- source4/heimdal/lib/des/hmac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/heimdal/lib') diff --git a/source4/heimdal/lib/des/hmac.c b/source4/heimdal/lib/des/hmac.c index 1d323b3725..4bcb0defa5 100644 --- a/source4/heimdal/lib/des/hmac.c +++ b/source4/heimdal/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 -- cgit