From 14faa41bebc8147d45f9f392fd33fca08e7d1ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 28 Feb 2017 09:41:03 +0000 Subject: [PATCH] fix leak Change-Id: I195094adfd0a68401d26ef97b6489b105424b99b --- lotuswordpro/source/filter/lwppagelayout.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 8a10267282ba..4fa01d2f936f 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -1024,7 +1024,7 @@ void LwpFooterLayout::ParseBackColor(XFFooterStyle* pFooterStyle) void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1) { - XFFooter* pFooter = new XFFooter(); + std::unique_ptr xFooter(new XFFooter()); rtl::Reference pStory = m_Content.obj(VO_STORY); //Call the RegisterStyle first to register the styles in footer paras, and then XFConvert() if(pStory.is()) @@ -1038,13 +1038,13 @@ void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1) //register child layout style for framelayout, RegisterChildStyle(); - pChangeMgr->SetHeadFootChange(pFooter); + pChangeMgr->SetHeadFootChange(xFooter.get()); - pStory->DoXFConvert(pFooter); + pStory->DoXFConvert(xFooter.get()); pChangeMgr->SetHeadFootFribMap(false); } - mp1->SetFooter(pFooter); + mp1->SetFooter(xFooter.release()); } void LwpFooterLayout::ParseWaterMark(XFFooterStyle * pFooterStyle)