[Pkg-gnupg-commit] [gnupg2] 06/166: tools: Fix memory leak.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Mar 16 22:33:00 UTC 2017


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

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 5b28f025085b386e0ec49535d4cd3f875a414eb0
Author: Justus Winter <justus at g10code.com>
Date:   Mon Jan 23 11:52:30 2017 +0100

    tools: Fix memory leak.
    
    * tools/gpgconf-comp.c (change_options_file): Fix leak.
    --
    Previously, 'src_filename' and 'orig_filename' leaked if creating the
    backup file failed.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tools/gpgconf-comp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index a25b513..85eb80a 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -2641,6 +2641,8 @@ change_options_file (gc_component_t component, gc_backend_t backend,
   if (res < 0 && errno != ENOENT)
     {
       xfree (dest_filename);
+      xfree (src_filename);
+      xfree (orig_filename);
       return -1;
     }
   if (res < 0)

-- 
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