mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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. -- Signed-off-by: Jakub Jelen <jjelen@redhat.com> Additional changes are: - Restructure to avoid a goto backwards. - Catch xtrymalloc failure. GnuPG-bug-id: 5393 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e6132bc9f4
commit
33a2362e56
3 changed files with 30 additions and 22 deletions
|
@ -512,6 +512,8 @@ daemon_start (enum daemon_type type, ctrl_t ctrl)
|
|||
log_error ("error spawning wait_child_thread: %s\n", strerror (err));
|
||||
npth_attr_destroy (&tattr);
|
||||
}
|
||||
else
|
||||
xfree (wctp);
|
||||
}
|
||||
|
||||
leave:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue