1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

g10: Fix memory leak for PKT_signature.

* g10/getkey.c (buf_to_sig): Free by free_seckey_enc.
* g10/gpgcompose.c (signature): Likewise.
* g10/sign.c (write_signature_packets): Likewise.

--

Reported-by: Philippe Antoine
GnuPG-bug-id: 4047
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2018-07-03 09:07:03 +09:00
parent 8a915cd9fa
commit 996febbab2
3 changed files with 3 additions and 3 deletions

View file

@ -772,7 +772,7 @@ write_signature_packets (ctrl_t ctrl,
gpg_strerror (rc));
}
else
xfree (sig);
free_seckey_enc (sig);
if (rc)
return rc;