Kaydet (Commit) 84cbee60 authored tarafından Caolán McNamara's avatar Caolán McNamara

CID#705759 why such an obvious mem leak here

Change-Id: I88cc0b371df9c827917a408c1bcc9a14e752a20f
üst dc76fc4e
...@@ -82,11 +82,10 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva ...@@ -82,11 +82,10 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType ) && TOX_HEADER_SECTION != eTmpType )
{ {
String* pString = OUString sString(pFmt->GetSection()->GetSectionName());
new String(pFmt->GetSection()->GetSectionName());
if(pAvailNames) if(pAvailNames)
pAvailNames->InsertEntry(*pString); pAvailNames->InsertEntry(sString);
rSubRegions.InsertEntry(*pString); rSubRegions.InsertEntry(sString);
lcl_FillList( rSh, rSubRegions, pAvailNames, pFmt ); lcl_FillList( rSh, rSubRegions, pAvailNames, pFmt );
} }
} }
...@@ -103,11 +102,10 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva ...@@ -103,11 +102,10 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType ) && TOX_HEADER_SECTION != eTmpType )
{ {
String* pString = OUString sString(pFmt->GetSection()->GetSectionName());
new String(pFmt->GetSection()->GetSectionName());
if(pAvailNames) if(pAvailNames)
pAvailNames->InsertEntry(*pString); pAvailNames->InsertEntry(sString);
rSubRegions.InsertEntry(*pString); rSubRegions.InsertEntry(sString);
lcl_FillList( rSh, rSubRegions, pAvailNames, pFmt ); lcl_FillList( rSh, rSubRegions, pAvailNames, pFmt );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment