If any of the operations on a successfully allocated e_id fails
dpp_decrypt_e_id() freed e_id, but forgot to clear the pointer that gets
returned to the caller. This could result in at least a theoretical use
of freed memory. Fix this by clearing the pointer to return an
appropriate indication of the failed operation.
Signed-off-by: Burvin Shi <burvin@amazon.com>
crypto_ec_point_invert(ec, e_id) ||
crypto_ec_point_add(ec, e_id, e_prime_id_point, e_id)) {
crypto_ec_point_deinit(e_id, 1);
+ e_id = NULL;
goto fail;
}