(EVP_MD_CTX_cleanup): clean out memory

This commit is contained in:
Love Hornquist Astrand
2009-08-16 20:42:38 +02:00
parent c57fcae29a
commit 76e01c5084

View File

@@ -176,6 +176,8 @@ EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) HC_DEPRECATED
{
if (ctx->md && ctx->md->cleanup)
(ctx->md->cleanup)(ctx);
else if (ctx->md)
memset(ctx->ptr, 0, ctx->md->ctx_size);
ctx->md = NULL;
ctx->engine = NULL;
free(ctx->ptr);