[Libreoffice-commits] core.git: vcl/generic

Caolán McNamara caolanm at redhat.com
Fri May 16 03:33:17 PDT 2014


 vcl/generic/glyphs/gcach_ftyp.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6709d982a5558cab4d0b7e13d5c72a3b074704d6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 16 10:50:39 2014 +0100

    lsan: mpFontCharMap double-add-ref, never released
    
    Change-Id: Id511d6d0d975434b4754786204cc0fc91568168e

diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 7a05833..47adb09 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -1292,8 +1292,8 @@ const ImplFontCharMap* FtFontInfo::GetImplFontCharMap( void )
     if( bOK )
         mpFontCharMap = new ImplFontCharMap( aCmapResult );
     else
-               mpFontCharMap = ImplFontCharMap::GetDefaultMap();
-    mpFontCharMap->AddReference();
+        mpFontCharMap = ImplFontCharMap::GetDefaultMap();
+    // mpFontCharMap on either branch now has a refcount of 1
     return mpFontCharMap;
 }
 


More information about the Libreoffice-commits mailing list