g10: Fix memory leak.

* g10/keyedit.c (menu_adduid): Don't copy 'sig'.

--

Fixes-commit: 809d67e740
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2016-11-15 21:10:51 +09:00
parent f86b1a15ad
commit 1f7639ebbe
1 changed files with 1 additions and 2 deletions

View File

@ -4349,8 +4349,7 @@ menu_adduid (ctrl_t ctrl, kbnode_t pub_keyblock,
add_kbnode (pub_keyblock, node);
pkt = xmalloc_clear (sizeof *pkt);
pkt->pkttype = PKT_SIGNATURE;
pkt->pkt.signature = copy_signature (NULL, sig);
free_seckey_enc (sig);
pkt->pkt.signature = sig;
if (pub_where)
insert_kbnode (node, new_kbnode (pkt), 0);
else