[git] GPGME - branch, master, updated. gpgme-1.12.0-28-g7a1b580

by Andre Heinecke cvs at cvs.gnupg.org
Mon Oct 29 20:01:46 CET 2018


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 "GnuPG Made Easy".

The branch, master has been updated
       via  7a1b58045f980c4df76daf225a2a1b604e8604d2 (commit)
      from  681525be003433728d127303d40712803b70cb9c (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 7a1b58045f980c4df76daf225a2a1b604e8604d2
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Oct 29 19:44:02 2018 +0100

    core,w32: Fix memleak of tmp_name in w32-io
    
    * src/w32-io.c (_gpgme_io_spawn): Free tmp_name.
    
    --
    GnuPG-Bug-Id: T4238

diff --git a/src/w32-io.c b/src/w32-io.c
index 05e11ee..d3b1b91 100644
--- a/src/w32-io.c
+++ b/src/w32-io.c
@@ -1610,6 +1610,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
     {
       close (tmp_fd);
       DeleteFileA (tmp_name);
+      free (tmp_name);
       return TRACE_SYSRES (-1);
     }
 
@@ -1649,6 +1650,9 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
       MessageBoxA (NULL, msg, "GpgME not installed correctly", MB_OK);
       gpgrt_free (msg);
       gpg_err_set_errno (EIO);
+      close (tmp_fd);
+      DeleteFileA (tmp_name);
+      free (tmp_name);
       return TRACE_SYSRES (-1);
     }
   if (!CreateProcessA (spawnhelper,
@@ -1667,12 +1671,14 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
       free (arg_string);
       close (tmp_fd);
       DeleteFileA (tmp_name);
+      free (tmp_name);
 
       /* FIXME: Should translate the error code.  */
       gpg_err_set_errno (EIO);
       return TRACE_SYSRES (-1);
     }
 
+  free (tmp_name);
   free (arg_string);
 
   if (flags & IOSPAWN_FLAG_ALLOW_SET_FG)
@@ -1702,6 +1708,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
 
 	  close (tmp_fd);
 	  DeleteFileA (tmp_name);
+          free (tmp_name);
 
 	  /* FIXME: Should translate the error code.  */
 	  gpg_err_set_errno (EIO);

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

Summary of changes:
 src/w32-io.c | 7 +++++++
 1 file changed, 7 insertions(+)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list