Fix for wc_ecc_ctx_free and heap hint. Fixes #4246.

This commit is contained in:
David Garske
2021-07-26 09:56:29 -07:00
parent 3bb2d55257
commit 28e8f02525

View File

@ -11171,8 +11171,10 @@ ecEncCtx* wc_ecc_ctx_new(int flags, WC_RNG* rng)
void wc_ecc_ctx_free(ecEncCtx* ctx)
{
if (ctx) {
void* heap = ctx->heap;
ForceZero(ctx, sizeof(ecEncCtx));
XFREE(ctx, ctx->heap, DYNAMIC_TYPE_ECC);
XFREE(ctx, heap, DYNAMIC_TYPE_ECC);
(void)heap;
}
}