[git] GpgOL - branch, master, updated. gpgol-2.3.0-89-gb3c8743

by Andre Heinecke cvs at cvs.gnupg.org
Tue Oct 16 10:53:40 CEST 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 extension for MS Outlook".

The branch, master has been updated
       via  b3c87431ea24946657956ae710440852da727582 (commit)
       via  f34cd2782bc0cd6f359c14de4d4a889ec4e49a6e (commit)
      from  14f7aea2d6bf4e2b463a0f8440deb7f92576a286 (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 b3c87431ea24946657956ae710440852da727582
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 16 10:52:57 2018 +0200

    Fix memleaks in new category code
    
    * src/categorymanager.cpp,
    src/oomhelp.cpp (get_store_for_id, delete_category): Fix leaks.

diff --git a/src/categorymanager.cpp b/src/categorymanager.cpp
index 1716b52..e671f2d 100644
--- a/src/categorymanager.cpp
+++ b/src/categorymanager.cpp
@@ -48,8 +48,10 @@ public:
         {
           log_debug ("%s:%s: Failed to create category %s",
                      SRCNAME, __func__, anonstr (category.c_str()));
+          gpgol_release (categories);
           TRETURN;
         }
+      gpgol_release (categories);
       TRETURN;
     }
 
@@ -131,6 +133,7 @@ public:
               TRETURN;
             }
           delete_category (store, category.c_str ());
+          gpgol_release (store);
           storeIt->second.erase (categoryIt);
         }
       TRETURN;
diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index 1cc2d0b..b859cb7 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -1879,12 +1879,14 @@ get_store_for_id (const char *storeID)
       if (id && !strcmp (id, storeID))
         {
           gpgol_release (stores);
+          xfree (id);
           return store;
         }
+      xfree (id);
       gpgol_release (store);
     }
   gpgol_release (stores);
-  return nullptr;
+  TRETURN nullptr;
 }
 
 void
@@ -2106,6 +2108,7 @@ delete_category (LPDISPATCH store, const char *category)
               log_debug ("%s:%s: Deleted category '%s'",
                          SRCNAME, __func__, anonstr (category));
             }
+          xfree (name);
           break;
         }
       xfree (name);

commit f34cd2782bc0cd6f359c14de4d4a889ec4e49a6e
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 16 10:52:32 2018 +0200

    Fix string alloc tracing
    
    * src/w32-gettext.h: Fix string alloc trace check

diff --git a/src/w32-gettext.h b/src/w32-gettext.h
index 24c3cd0..e8547d3 100644
--- a/src/w32-gettext.h
+++ b/src/w32-gettext.h
@@ -73,7 +73,7 @@ char *native_to_utf8 (const char *string);
 
 #define utf8_to_wchar(VAR1) ({wchar_t *retval; \
   retval = _utf8_to_wchar (VAR1); \
-  if ((opt.enable_debug & (DBG_TRACE & DBG_DATA & DBG_MEMORY))) \
+  if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \
   { \
     log_debug ("%s:%s:%i wchar_t alloc %p:%S", \
                SRCNAME, __func__, __LINE__, retval, retval); \
@@ -82,7 +82,7 @@ retval;})
 
 #define wchar_to_utf8(VAR1) ({char *retval; \
   retval = _wchar_to_utf8 (VAR1); \
-  if ((opt.enable_debug & (DBG_TRACE & DBG_DATA & DBG_MEMORY))) \
+  if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \
   { \
     log_debug ("%s:%s:%i char utf8 alloc %p:%s", \
                SRCNAME, __func__, __LINE__, retval, retval); \

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

Summary of changes:
 src/categorymanager.cpp | 3 +++
 src/oomhelp.cpp         | 5 ++++-
 src/w32-gettext.h       | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list