<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - CoreTextGlyphFallbackSubstitution::FindFontSubstitute() leaks memory on invocation"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111497#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - CoreTextGlyphFallbackSubstitution::FindFontSubstitute() leaks memory on invocation"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111497">bug 111497</a>
from <span class="vcard"><a class="email" href="mailto:iplaw67@tuta.io" title="Alex Thurgood <iplaw67@tuta.io>"> <span class="fn">Alex Thurgood</span></a>
</span></b>
<pre>The leak appears to occur here :
line 80, salgdi.xx :
CTFontDescriptorRef pDesc = CTFontCopyFontDescriptor(pFallback);
from this block :
bool bFound = false;
CoreTextStyle rStyle(rPattern);
CTFontRef pFont =
static_cast<CTFontRef>(CFDictionaryGetValue(rStyle.GetStyleDict(),
kCTFontAttributeName));
CFStringRef pStr = CreateCFString(rMissingChars);
if (pStr)
{
CTFontRef pFallback = CTFontCreateForString(pFont, pStr, CFRangeMake(0,
CFStringGetLength(pStr)));
if (pFallback)
{
bFound = true;
CTFontDescriptorRef pDesc = CTFontCopyFontDescriptor(pFallback);
FontAttributes rAttr = DevFontFromCTFontDescriptor(pDesc, nullptr);
rPattern.maSearchName = rAttr.GetFamilyName();
rPattern.SetWeight(rAttr.GetWeight());
rPattern.SetItalic(rAttr.GetItalic());
rPattern.SetPitch(rAttr.GetPitch());
rPattern.SetWidthType(rAttr.GetWidthType());
SalData* pSalData = GetSalData();
if (pSalData->mpFontList)
rPattern.mpFontData =
pSalData->mpFontList->GetFontDataFromId(reinterpret_cast<sal_IntPtr>(pDesc));
CFRelease(pFallback);
}
CFRelease(pStr);
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>