[git] GpgOL - branch, master, updated. gpgol-2.2.0-85-g2116eb9

by Andre Heinecke cvs at cvs.gnupg.org
Fri Jul 20 12:05: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  2116eb9008fd93506686219cbdb332b8c29f303e (commit)
       via  37a852d0b5190357fd311904fb817a7b2745d6da (commit)
       via  4db938bdf940d401fe0f2361ad14398d09a02b8d (commit)
       via  3fcd5d9daa2224da5a7b2eda992e60c54ce7e2ec (commit)
       via  5cc4867b399a48b281e7375f122da11bbf32e2a2 (commit)
       via  961c03f8c4226f57c5b25744a7330e551eb14dff (commit)
      from  35e663754f7d407adf4ae6864f41da288f11ecb9 (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 2116eb9008fd93506686219cbdb332b8c29f303e
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jul 20 12:04:50 2018 +0200

    Fix minor ref leaks
    
    * src/oomhelp.cpp (get_account_for_mail): Release account.
    (ensure_category_exists): Release categories on error.

diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index 8ca1d75..462d44e 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -1817,6 +1817,7 @@ ensure_category_exists (LPDISPATCH application, const char *category, int color)
           if (!category_obj)
             {
               TRACEPOINT;
+              gpgol_release (categories);
               break;
             }
           char *name = get_oom_string (category_obj, "Name");
@@ -2085,6 +2086,7 @@ get_account_for_mail (const char *mbox)
 
       if (!smtpAddr)
         {
+          gpgol_release (account);
           TRACEPOINT;
           continue;
         }
@@ -2094,6 +2096,7 @@ get_account_for_mail (const char *mbox)
           xfree (smtpAddr);
           return account;
         }
+      gpgol_release (account);
       xfree (smtpAddr);
     }
   gpgol_release (accounts);

commit 37a852d0b5190357fd311904fb817a7b2745d6da
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jul 20 12:04:10 2018 +0200

    Fix ref leak in get_oom_recipients
    
    * src/oomhelp.cpp (get_oom_recipients): Release addrEntry.

diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index 2da1703..8ca1d75 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -1374,6 +1374,7 @@ get_oom_recipients (LPDISPATCH recipients, bool *r_err)
           gpgol_release (addrEntry);
           continue;
         }
+      gpgol_release (addrEntry);
 
       char *resolved = get_pa_string (recipient, PR_SMTP_ADDRESS_DASL);
       if (resolved)

commit 4db938bdf940d401fe0f2361ad14398d09a02b8d
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jul 20 12:03:03 2018 +0200

    Add missing memdbg_addRefs
    
    * src/mapihelp.cpp (mapi_get_attach): Add missing addRef.
    * src/mimemaker.cpp (create_mapi_attachment): Ditto.

diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 6956e43..f1beb9d 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -2553,6 +2553,7 @@ mapi_get_attach (LPMESSAGE message,
     return NULL;
 
   hr = message->OpenAttach (item->mapipos, NULL, MAPI_BEST_ACCESS, &att);
+  memdbg_addRef (att);
   if (FAILED (hr))
     {
       log_error ("%s:%s: can't open attachment at %d: hr=%#lx",
diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp
index 29dcb3c..4dd55a9 100644
--- a/src/mimemaker.cpp
+++ b/src/mimemaker.cpp
@@ -143,6 +143,7 @@ create_mapi_attachment (LPMESSAGE message, sink_t sink,
   sink->cb_data = NULL;
   sink->writefnc = NULL;
   hr = message->CreateAttach(NULL, 0, &pos, &att);
+  memdbg_addRef (att);
   if (hr)
     {
       log_error ("%s:%s: can't create attachment: hr=%#lx\n",

commit 3fcd5d9daa2224da5a7b2eda992e60c54ce7e2ec
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jul 20 12:02:10 2018 +0200

    Add ptr and line to addRef dbg output
    
    * src/memdbg.h (memdbg_addRef): Debug out the line.
    
    --
    This makes it easy to find where leaked objects were
    referenced.

diff --git a/src/memdbg.cpp b/src/memdbg.cpp
index 088767f..341e105 100644
--- a/src/memdbg.cpp
+++ b/src/memdbg.cpp
@@ -92,7 +92,7 @@ register_name (void *obj)
 }
 
 void
-memdbg_addRef (void *obj)
+_memdbg_addRef (void *obj)
 {
   DBGGUARD;
 
diff --git a/src/memdbg.h b/src/memdbg.h
index a9ea4c5..37437bd 100644
--- a/src/memdbg.h
+++ b/src/memdbg.h
@@ -29,7 +29,17 @@ extern "C" {
 #endif
 #endif
 
-void memdbg_addRef (void *obj);
+#define memdbg_addRef(X) \
+{ \
+  if (X) \
+    { \
+      log_oom_extra ("%s:%s:%i AddRef on %p", \
+                     SRCNAME, __func__, __LINE__, X); \
+      _memdbg_addRef (X); \
+    } \
+}
+
+void _memdbg_addRef (void *obj);
 void memdbg_released (void *obj);
 
 void memdbg_ctor (const char *objName);

commit 5cc4867b399a48b281e7375f122da11bbf32e2a2
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jul 20 12:01:23 2018 +0200

    Fix attach table leak
    
    * src/cryptcontroller.cpp (CryptController::collect_data): Fix
    table leak.

diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp
index 993c953..265bc60 100644
--- a/src/cryptcontroller.cpp
+++ b/src/cryptcontroller.cpp
@@ -116,6 +116,7 @@ CryptController::collect_data ()
                          utf8_gettext ("Can't encrypt / sign an empty message."),
                          utf8_gettext ("GpgOL"), MB_OK);
       gpgol_release (message);
+      mapi_release_attach_table (att_table);
       xfree (body);
       return -1;
     }
@@ -156,12 +157,15 @@ CryptController::collect_data ()
       log_error ("%s:%s: Collecting body and attachments failed.",
                  SRCNAME, __func__);
       gpgol_release (message);
+      mapi_release_attach_table (att_table);
       return -1;
     }
 
   /* Message is no longer needed */
   gpgol_release (message);
 
+  mapi_release_attach_table (att_table);
+
   /* Set the input buffer to start. */
   m_input.seek (0, SEEK_SET);
   return 0;

commit 961c03f8c4226f57c5b25744a7330e551eb14dff
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jul 20 11:18:34 2018 +0200

    Fix ref leak in setDoAutosecure_m
    
    * src/mail.cpp (Mail::setDoAutosecure_m): Release msg.

diff --git a/src/mail.cpp b/src/mail.cpp
index 38ee1d0..bdb6d7f 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -3369,10 +3369,12 @@ Mail::setDoAutosecure_m (bool value)
                  SRCNAME, __func__, m_mailitem);
       m_first_autosecure_check = false;
       m_manual_crypto_opts = true;
+      gpgol_release (msg);
       return;
     }
   m_first_autosecure_check = false;
   set_gpgol_draft_info_flags (msg, value ? 3 : 0);
+  gpgol_release (msg);
   gpgoladdin_invalidate_ui();
 }
 

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

Summary of changes:
 src/cryptcontroller.cpp |  4 ++++
 src/mail.cpp            |  2 ++
 src/mapihelp.cpp        |  1 +
 src/memdbg.cpp          |  2 +-
 src/memdbg.h            | 12 +++++++++++-
 src/mimemaker.cpp       |  1 +
 src/oomhelp.cpp         |  4 ++++
 7 files changed, 24 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list