mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: Fix memory leak in ecc key generation.
* g10/keygen.c (ecckey_from_sexp): Release curve. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f1304ee9b2
commit
98433c7043
@ -1102,7 +1102,7 @@ ecckey_from_sexp (gcry_mpi_t *array, gcry_sexp_t sexp, int algo)
|
||||
{
|
||||
gpg_error_t err;
|
||||
gcry_sexp_t list, l2;
|
||||
char *curve;
|
||||
char *curve = NULL;
|
||||
int i;
|
||||
const char *oidstr;
|
||||
unsigned int nbits;
|
||||
@ -1171,6 +1171,7 @@ ecckey_from_sexp (gcry_mpi_t *array, gcry_sexp_t sexp, int algo)
|
||||
}
|
||||
|
||||
leave:
|
||||
xfree (curve);
|
||||
if (err)
|
||||
{
|
||||
for (i=0; i < 3; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user