mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01: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:
parent
8a915cd9fa
commit
996febbab2
@ -3142,7 +3142,7 @@ buf_to_sig (const byte * buf, size_t len)
|
||||
|
||||
if (parse_signature (iobuf, PKT_SIGNATURE, len, sig) != 0)
|
||||
{
|
||||
xfree (sig);
|
||||
free_seckey_enc (sig);
|
||||
sig = NULL;
|
||||
}
|
||||
|
||||
|
@ -1835,7 +1835,7 @@ signature (const char *option, int argc, char *argv[], void *cookie)
|
||||
debug ("Wrote signature packet:\n");
|
||||
dump_component (&pkt);
|
||||
|
||||
xfree (sig);
|
||||
free_seckey_enc (sig);
|
||||
release_kbnode (si.issuer_kb);
|
||||
xfree (si.revocation_key);
|
||||
|
||||
|
@ -772,7 +772,7 @@ write_signature_packets (ctrl_t ctrl,
|
||||
gpg_strerror (rc));
|
||||
}
|
||||
else
|
||||
xfree (sig);
|
||||
free_seckey_enc (sig);
|
||||
|
||||
if (rc)
|
||||
return rc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user