Home GnuPG
Diffusion GnuPG a95ddffdcd58

agent: Avoid memory leaks in error code paths.

Description

agent: Avoid memory leaks in error code paths.

* agent/command.c (cmd_genkey): Use goto instead of return.
* agent/cvt-openpgp.c (convert_from_openpgp_main): Ditto.
* agent/genkey.c (agent_ask_new_passphrase): Fix typo to free correct
pointer
(agent_genkey): Release memory
* agent/gpg-agent.c (check_own_socket): Free sockname
* agent/protect-tool.c (read_key): Free buf.
(agent_askpin): Free passphrase

Changed original patch to not add a free before a GPG_ERR_BUG.

  • Signed-off-by: Werner Koch <wk@gnupg.org>
  • GnuPG-bug-id: T5393

Details

Provenance
JakujeAuthored on May 20 2021, 10:13 AM
wernerCommitted on May 20 2021, 1:38 PM
Parents
rGa660e1060630: dirmngr: For KS_SEARCH return the fingerprint also with LDAP.
Branches
Unknown
Tags
Unknown
Tasks
T5393: gnupg coverity static analysis reports