From d6ac6475a5f0304e0d9b770a5f8ec98f425e59b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 2 Mar 2017 11:51:30 +0000 Subject: [PATCH] fix leak Change-Id: I01c7ebf10831a27eaab55c2082cbe0a0f28bda1f --- lotuswordpro/source/filter/lwptablelayout.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index f44544fc3eaa..67c299115803 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -381,25 +381,25 @@ void LwpSuperTableLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 n { if(m_pFrame) { - XFFrame* pXFFrame = nullptr; + rtl::Reference xXFFrame; if(nEnd < nStart) { - pXFFrame = new XFFrame(); + xXFFrame.set(new XFFrame); } else { - pXFFrame = new XFFloatFrame(nStart, nEnd, bAll); + xXFFrame.set(new XFFloatFrame(nStart, nEnd, bAll)); } - m_pFrame->Parse(pXFFrame, static_cast(nStart)); + m_pFrame->Parse(xXFFrame.get(), static_cast(nStart)); //parse table, and add table to frame LwpTableLayout * pTableLayout = GetTableLayout(); if (pTableLayout) { - pTableLayout->XFConvert(pXFFrame); + pTableLayout->XFConvert(xXFFrame.get()); } //add frame to the container - pCont ->Add(pXFFrame); + pCont->Add(xXFFrame.get()); } }