[Pkg-gnupg-commit] [gnupg2] 85/241: gpg: Eliminate a memory leak.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 9 20:31:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e
Author: Neal H. Walfield <neal at g10code.com>
Date:   Thu Oct 29 09:57:00 2015 +0100

    gpg: Eliminate a memory leak.
    
    * g10/gpg.c (main): Don't leak OPT.DEF_RECIPIENT.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
---
 g10/gpg.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/g10/gpg.c b/g10/gpg.c
index c18edd0..0f1c74a 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2580,7 +2580,10 @@ main (int argc, char **argv)
 	  case oDefaultKey: opt.def_secret_key = pargs.r.ret_str; break;
 	  case oDefRecipient:
             if( *pargs.r.ret_str )
-              opt.def_recipient = make_username(pargs.r.ret_str);
+	      {
+		xfree (opt.def_recipient);
+		opt.def_recipient = make_username(pargs.r.ret_str);
+	      }
             break;
 	  case oDefRecipientSelf:
             xfree(opt.def_recipient); opt.def_recipient = NULL;

-- 
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