[git] GPGME - branch, master, updated. gpgme-1.4.3-24-g85a07ca

by Werner Koch cvs at cvs.gnupg.org
Tue Apr 15 22:20:38 CEST 2014


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  85a07ca7e3dffdefc8ae74beebb59e47a6e6bd1b (commit)
      from  2bb26185e3b9a048033c559517d6ba7d2eb47066 (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 85a07ca7e3dffdefc8ae74beebb59e47a6e6bd1b
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Apr 15 16:40:48 2014 +0200

    w32: Fix memleak in an error code paths.
    
    * src/w32-io.c (create_writer): Free CTX in cased of bad FD.
    * src/w32-util.c (_gpgme_mkstemp): Free TMPNAME in case of a failed
    mkstemp.
    --
    
    Found by Hans-Christoph Steiner with cppcheck.

diff --git a/src/w32-io.c b/src/w32-io.c
index 634ecb3..d00b8db 100644
--- a/src/w32-io.c
+++ b/src/w32-io.c
@@ -794,6 +794,7 @@ create_writer (int fd)
   if (fd < 0 || fd >= MAX_SLAFD || !fd_table[fd].used)
     {
       TRACE_SYSERR (EIO);
+      free (ctx);
       return NULL;
     }
   TRACE_LOG4 ("fd=%d -> handle=%p socket=%d dupfrom=%d",
diff --git a/src/w32-util.c b/src/w32-util.c
index 3884b40..daf3bd2 100644
--- a/src/w32-util.c
+++ b/src/w32-util.c
@@ -710,7 +710,10 @@ _gpgme_mkstemp (int *fd, char **name)
   strcpy (stpcpy (tmpname, tmp), "\\gpgme-XXXXXX");
   *fd = mkstemp (tmpname);
   if (fd < 0)
-    return -1;
+    {
+      free (tmpname);
+      return -1;
+    }
 
   *name = tmpname;
   return 0;

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

Summary of changes:
 src/w32-io.c   |    1 +
 src/w32-util.c |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)


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




More information about the Gnupg-commits mailing list