mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Merge pull request #4249 from dgarske/ecc_heap
Fix for `wc_ecc_ctx_free` and heap hint
This commit is contained in:
@ -11176,8 +11176,10 @@ ecEncCtx* wc_ecc_ctx_new(int flags, WC_RNG* rng)
|
|||||||
void wc_ecc_ctx_free(ecEncCtx* ctx)
|
void wc_ecc_ctx_free(ecEncCtx* ctx)
|
||||||
{
|
{
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
|
void* heap = ctx->heap;
|
||||||
ForceZero(ctx, sizeof(ecEncCtx));
|
ForceZero(ctx, sizeof(ecEncCtx));
|
||||||
XFREE(ctx, ctx->heap, DYNAMIC_TYPE_ECC);
|
XFREE(ctx, heap, DYNAMIC_TYPE_ECC);
|
||||||
|
(void)heap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user