g10: Fix memory leak.
authorJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 10:46:40 +0000 (11:46 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 10:46:40 +0000 (11:46 +0100)
* g10/keyedit.c (menu_adduid): Deallocate 'sig'.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/keyedit.c

index ffc0da7..4fba224 100644 (file)
@@ -4350,6 +4350,7 @@ menu_adduid (ctrl_t ctrl, kbnode_t pub_keyblock,
   pkt = xmalloc_clear (sizeof *pkt);
   pkt->pkttype = PKT_SIGNATURE;
   pkt->pkt.signature = copy_signature (NULL, sig);
+  free_seckey_enc (sig);
   if (pub_where)
     insert_kbnode (node, new_kbnode (pkt), 0);
   else