diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 4344d0580..3f7e88c2a 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -2249,7 +2249,7 @@ int wc_ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out, } if ((err = mp_init_multi(&prime, &a, NULL, NULL, NULL, NULL)) != MP_OKAY) { - wc_ecc_del_point(result); + wc_ecc_del_point_h(result, private_key->heap); return err; }