mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02: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"),
|
log_error (_("public key %s not found: %s\n"),
|
||||||
keystr (kid), gpg_strerror (err));
|
keystr (kid), gpg_strerror (err));
|
||||||
|
xfree (pk);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -836,6 +837,8 @@ update_min_ownertrust (ctrl_t ctrl, u32 *kid, unsigned int new_trust)
|
|||||||
{
|
{
|
||||||
tdbio_invalid ();
|
tdbio_invalid ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free_public_key (pk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user