[Libreoffice-commits] core.git: svtools/source

Caolán McNamara caolanm at redhat.com
Fri Apr 28 20:24:25 UTC 2017


 svtools/source/misc/embedhlp.cxx |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit ea0cf4f980e03ad27583453c6088c465c32b6eae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 28 17:05:40 2017 +0100

    ofz: fix leak
    
    Change-Id: Ib31b3bfabaaaeb9b71635dadd099874d9c972fd0
    Reviewed-on: https://gerrit.libreoffice.org/37080
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index fbebecfdf027..ec7eb7a87146 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -347,17 +347,16 @@ void EmbeddedObjectRef::Clear()
                 }
             }
         }
+    }
 
-        if ( mpImpl->xListener )
-        {
-            mpImpl->xListener->pObject = nullptr;
-            mpImpl->xListener->release();
-            mpImpl->xListener = nullptr;
-        }
-
-        mpImpl->mxObj = nullptr;
+    if (mpImpl->xListener)
+    {
+        mpImpl->xListener->pObject = nullptr;
+        mpImpl->xListener->release();
+        mpImpl->xListener = nullptr;
     }
 
+    mpImpl->mxObj = nullptr;
     mpImpl->pContainer = nullptr;
     mpImpl->bIsLocked = false;
     mpImpl->bNeedUpdate = false;


More information about the Libreoffice-commits mailing list