Home GnuPG
Diffusion GnuPG 5996c7bf99f3

gpg: Fix memory leak in the error case of signature creation.
5996c7bf99f3Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Fix memory leak in the error case of signature creation.

* g10/sign.c (write_signature_packets): Free SIG.  Also replace
xcalloc by xtrycalloc.

If do_sign fails SIG was not released. Note that in the good case SIG
is transferred to PKT and freed by free_packet.

  • Reported-by: Stephan Müller
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Feb 10 2017, 5:16 PM
Parents
rG8810314e377a: common: Avoid warning about implicit declaration of gnupg_fd_valid.
Branches
Unknown
Tags
Unknown

Event Timeline