[git] GnuPG - branch, master, updated. gnupg-2.1.22-19-gb70e86f

by Werner Koch cvs at cvs.gnupg.org
Fri Aug 4 22:51:58 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  b70e86fd1050fc6da07a177ed142ae9882b4dd0d (commit)
      from  0767eada1479c0fa9d4b75781a8c2afb67bdbf90 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b70e86fd1050fc6da07a177ed142ae9882b4dd0d
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Aug 4 22:46:40 2017 +0200

    gpg: Fix memory leak in parse_auto_key_locate.
    
    * g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS.
    --
    
    It was probably too late for me to hack.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/getkey.c b/g10/getkey.c
index 5b7aff9..852c532 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -4232,8 +4232,9 @@ int
 parse_auto_key_locate (const char *options_arg)
 {
   char *tok;
-  char *options = xstrdup (options_arg);
+  char *options, *options_buf;
 
+  options = options_buf = xstrdup (options_arg);
   while ((tok = optsep (&options)))
     {
       struct akl *akl, *check, *last = NULL;
@@ -4272,7 +4273,7 @@ parse_auto_key_locate (const char *options_arg)
       else
 	{
 	  free_akl (akl);
-          xfree (options);
+          xfree (options_buf);
 	  return 0;
 	}
 
@@ -4301,7 +4302,7 @@ parse_auto_key_locate (const char *options_arg)
 	}
     }
 
-  xfree (options);
+  xfree (options_buf);
   return 1;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 g10/getkey.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list