[Libreoffice-commits] .: vcl/unx
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Mar 23 10:09:03 PDT 2011
vcl/unx/source/fontmanager/fontconfig.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 04c1efc6a9be0a78a128bad82050d39bf6aeb6cf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 23 13:54:11 2011 +0000
big leak right from the start I believe, approx 800k+
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index 27c4079..8c67c99 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -514,11 +514,15 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
// #i115131# double check results and eventually ignore them
eOutRes = FcPatternGetBool( pBetterPattern, FC_OUTLINE, 0, &bOutline );
if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) )
+ {
+ FcPatternDestroy( pBetterPattern );
continue;
+ }
}
+ else
+ FcPatternReference( pBetterPattern );
// insert best found pattern for the dupe-search pattern
// TODO: skip inserting patterns that are already known in the target fontset
- FcPatternReference( pBetterPattern );
FcFontSetAdd( m_pOutlineSet, pBetterPattern );
}
@@ -535,7 +539,7 @@ FcFontSet* FontCfgWrapper::getFontSet()
{
m_pOutlineSet = FcFontSetCreate();
addFontSet( FcSetSystem );
- if( m_nFcVersion > 20400 ) // #i85462# prevent crashes
+ if( m_nFcVersion > 20400 ) // #i85462# prevent crashes
addFontSet( FcSetApplication );
}
#endif
More information about the Libreoffice-commits
mailing list