mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
gpg: Fix memory leak while running --check-trustdb.
* g10/trustdb.c (update_min_ownertrust): Free PK. -- This bug was revealed by the new trust-pgp-2.scm test. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
b065a69634
commit
13821e15fb
@ -797,6 +797,7 @@ update_min_ownertrust (ctrl_t ctrl, u32 *kid, unsigned int new_trust)
|
||||
{
|
||||
log_error (_("public key %s not found: %s\n"),
|
||||
keystr (kid), gpg_strerror (err));
|
||||
xfree (pk);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -836,6 +837,8 @@ update_min_ownertrust (ctrl_t ctrl, u32 *kid, unsigned int new_trust)
|
||||
{
|
||||
tdbio_invalid ();
|
||||
}
|
||||
|
||||
free_public_key (pk);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user