[git] GpgOL - branch, master, updated. gpgol-1.2.0-95-gf0bca1f

by Andre Heinecke cvs at cvs.gnupg.org
Thu Nov 12 11:52:57 CET 2015


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  f0bca1fdeb4ce24a6f665517b12f0e502a2cb906 (commit)
       via  4f8c746e390d754fe4a8f7ae7a8968f750d2b1f9 (commit)
      from  099467d571206a3dbf4b606792a01a1e7f0e0df8 (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 f0bca1fdeb4ce24a6f665517b12f0e502a2cb906
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Nov 12 10:55:19 2015 +0100

    Do not release eventsink when disabled
    
    * src/gpgoladdin.cpp (GpgolAddin::~GpgolAddin): Do not release
    m_appliactionEventSink when disabled. Use NULL guarded release.
    
    --
    When we are disabled OnStartupComplete never creates the event
    sink but the addin's dtor is called on unload.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 93a0f7a..8b03782 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -164,15 +164,16 @@ GpgolAddin::GpgolAddin (void) : m_lRef(0), m_application(0),
 
 GpgolAddin::~GpgolAddin (void)
 {
+  if (m_disabled)
+    {
+      return;
+    }
   log_debug ("%s:%s: Releasing Application Event Sink;",
              SRCNAME, __func__);
-  m_applicationEventSink->Release();
+  RELDISP (m_applicationEventSink);
 
-  if (!m_disabled)
-    {
-      engine_deinit ();
-      write_options ();
-    }
+  engine_deinit ();
+  write_options ();
 
   log_debug ("%s:%s: Object deleted\n", SRCNAME, __func__);
 }

commit 4f8c746e390d754fe4a8f7ae7a8968f750d2b1f9
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Nov 12 10:50:08 2015 +0100

    Fix double free when addin is disabled
    
    * src/gpgoladdin.cpp (GpgolAddin::~GpgolAddin): Do not release
     RibbonExtender.
    
    --
    The RibbonExtender is already released by outlook. So we released
    an invalid object here. This worked often enough but could of course
    crash.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 6f4c4a4..93a0f7a 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -164,10 +164,6 @@ GpgolAddin::GpgolAddin (void) : m_lRef(0), m_application(0),
 
 GpgolAddin::~GpgolAddin (void)
 {
-  log_debug ("%s:%s: Releasing Extender;",
-             SRCNAME, __func__);
-  m_ribbonExtender->Release ();
-
   log_debug ("%s:%s: Releasing Application Event Sink;",
              SRCNAME, __func__);
   m_applicationEventSink->Release();

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

Summary of changes:
 src/gpgoladdin.cpp | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)


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




More information about the Gnupg-commits mailing list