[Pkg-gnupg-commit] [gnupg2] 86/160: g10: Fix memory leak.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Jul 15 09:36:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch upstream
in repository gnupg2.
commit 401db0eebbcd28dca8f4059706bfbd18d8cc7528
Author: Justus Winter <justus at g10code.com>
Date: Thu Jun 30 18:49:15 2016 +0200
g10: Fix memory leak.
* g10/export.c (do_export_stream): Free secret parameters.
Signed-off-by: Justus Winter <justus at g10code.com>
---
g10/export.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/g10/export.c b/g10/export.c
index b067376..4137235 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -1557,6 +1557,15 @@ do_export_stream (ctrl_t ctrl, iobuf_t out, strlist_t users, int secret,
xfree (pk->seckey_info);
pk->seckey_info = NULL;
+ {
+ int i;
+ for (i = pubkey_get_npkey (pk->pubkey_algo);
+ i < pubkey_get_nskey (pk->pubkey_algo); i++)
+ {
+ gcry_mpi_release (pk->pkey[i]);
+ pk->pkey[i] = NULL;
+ }
+ }
xfree (hexgrip);
}
else
--
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