g10: Fix memory leak.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Nov 2016 12:10:51 +0000 (21:10 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Nov 2016 12:10:51 +0000 (21:10 +0900)
* g10/keyedit.c (menu_adduid): Don't copy 'sig'.

--

Fixes-commit: 809d67e74014cb563efd965744fd11f87bbae743
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/keyedit.c

index 4fba224..171afb7 100644 (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