[Pkg-gnupg-commit] [gnupg2] 19/30: gpg: Fix memory leak while running --check-trustdb.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Sep 6 21:57:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 13821e15fb9bdddfce79d88731c0f151724b2371
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Aug 24 22:06:59 2017 +0200

    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 at gnupg.org>
---
 g10/trustdb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/g10/trustdb.c b/g10/trustdb.c
index e2c3bda..92c1ca5 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -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);
 }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list