mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-09 21:28:51 +01:00
agent: Avoid memory leak when handling tpm2.
* agent/divert-tpm2.c (agent_write_tpm2_shadow_key): Free memory on errors. -- GnuPG-bug-id: 7201 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
parent
4bdd43fdca
commit
be40a33419
@ -53,6 +53,7 @@ agent_write_tpm2_shadow_key (ctrl_t ctrl, const unsigned char *grip,
|
|||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
log_error ("failed to delete unshadowed key: %s\n", gpg_strerror (err));
|
log_error ("failed to delete unshadowed key: %s\n", gpg_strerror (err));
|
||||||
|
xfree (shdkey);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user