1
0
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:
Werner Koch 2016-12-12 14:02:14 +01:00
parent f1304ee9b2
commit 98433c7043
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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++)