ecc: Fix some memory leaks
* cipher/ecc-curves.c (_gcry_mpi_ec_new): Free ec->b before assigning. * cipher/ecc.c (nist_generate_key): Release Q. * cipher/ecc-eddsa.c (_gcry_ecc_eddsa_genkey): Ditto.
_gcry_mpi_ec_new: Fixing memory leak detected with valgrind; if 'b' is
non-NULL, the code in ec_p_init (ec.c:379) already makes a copy of
'b', so before we clobber ctx->b here, we need to at least release the
old value (however, it would of course be nicer to not first make a
copy of b in the first place, but this is the most localized change to
get rid of the memory leak).
nist_generate_key: Fixing rather obvious local leak; Q is first
initialized, then used, copied into the result but never released.