g10: Fix memory leak.
authorJustus Winter <justus@g10code.com>
Thu, 30 Jun 2016 12:00:46 +0000 (14:00 +0200)
committerJustus Winter <justus@g10code.com>
Thu, 30 Jun 2016 16:50:16 +0000 (18:50 +0200)
* g10/sign.c (write_plaintext_packet): Free packet.

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

index 3a96f0f..5e46797 100644 (file)
@@ -627,6 +627,7 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode)
             log_error ("build_packet(PLAINTEXT) failed: %s\n",
                        gpg_strerror (rc) );
         pt->buf = NULL;
+        free_packet (&pkt);
     }
     else {
         byte copy_buffer[4096];