Home GnuPG
Diffusion GnuPG 33a2362e566c

agent: Fix memory leaks

Description

agent: Fix memory leaks

* agent/call-daemon.c (daemon_start): free wctp
* agent/call-scd.c (agent_card_pksign): return error instead of noop
(card_keyinfo_cb): free keyinfo.  Restructure to avoid a goto backwards.
* agent/protect.c (agent_get_shadow_info_type): allocate only as a last
action.  Catch xtrymalloc failure.
(agent_is_tpm2_key): Free buf.

Additional changes are:

  • Restructure to avoid a goto backwards.
  • Catch xtrymalloc failure.
  • Signed-off-by: Werner Koch <wk@gnupg.org>
  • GnuPG-bug-id: T5393

Details

Provenance
JakujeAuthored on Apr 12 2021, 7:19 PM
wernerCommitted on May 20 2021, 2:28 PM
Parents
rGe6132bc9f417: sm: Avoid memory leaks and double double-free
Branches
Unknown
Tags
Unknown
Tasks
T5393: gnupg coverity static analysis reports