diff options
author | Neal H. Walfield <neal@g10code.com> | 2015-10-29 09:57:00 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@g10code.com> | 2015-10-29 10:10:40 +0100 |
commit | 89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e (patch) | |
tree | 9b56d2a7899eeb2489b6395bdabea5e6ec98a285 /g10/gpg.c | |
parent | gpg: Fix keyring support. (diff) | |
download | gnupg2-89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e.tar.xz gnupg2-89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e.zip |
gpg: Eliminate a memory leak.
* g10/gpg.c (main): Don't leak OPT.DEF_RECIPIENT.
--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
Diffstat (limited to '')
-rw-r--r-- | g10/gpg.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |