summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-31 21:43:59 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-08-11 10:33:44 +0000
commit9f149784501b6c867f6136d94d438ad926964efd (patch)
treed9adedddd941119f7ead0c1e4f8e84658c9fc6ad /formula
parent4c9f600eb3ab76f2f4f4fde0cdc3bc91862d029b (diff)
fix memory leak around function descriptions
Found by Lsan. Change-Id: Ia443ed6eb2a20854998a615f3c2bd9fdac156a8c (cherry picked from commit 3d6521280929ecacc53b7c358d29d0b5d31b3462) Reviewed-on: https://gerrit.libreoffice.org/10740 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 5805778a8eac..6c999bdea0bb 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -21,6 +21,8 @@
#include <unotools/charclass.hxx>
#include <unotools/syslocale.hxx>
+#include <boost/scoped_ptr.hpp>
+
namespace formula
{
@@ -91,7 +93,7 @@ bool FormulaHelper::GetNextFunc( const OUString& rFormula,
const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
for(sal_uInt32 j= 0; j < nCategoryCount && !*ppFDesc; ++j)
{
- const IFunctionCategory* pCategory = m_pFunctionManager->getCategory(j);
+ boost::scoped_ptr<const IFunctionCategory> pCategory(m_pFunctionManager->getCategory(j));
const sal_uInt32 nCount = pCategory->getCount();
for(sal_uInt32 i = 0 ; i < nCount; ++i)
{