Merge pull request #4249 from dgarske/ecc_heap

Fix for `wc_ecc_ctx_free` and heap hint
This commit is contained in:
John Safranek
2021-07-27 09:31:01 -07:00
committed by GitHub

View File

@ -11176,8 +11176,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;
}
}