[Pkg-gnupg-commit] [gnupg2] 89/180: gpg: Fix memory leak in ecc key generation.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sat Dec 24 22:29:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 98433c70431dfbde99b0e89416856d1eef9ebc88
Author: Werner Koch <wk at gnupg.org>
Date: Mon Dec 12 14:02:14 2016 +0100
gpg: Fix memory leak in ecc key generation.
* g10/keygen.c (ecckey_from_sexp): Release curve.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
g10/keygen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/g10/keygen.c b/g10/keygen.c
index c1abc70..c937084 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -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++)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list