summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-31 21:43:59 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-31 22:14:25 +0200
commit3d6521280929ecacc53b7c358d29d0b5d31b3462 (patch)
tree44bc202020f1df22042ad89e493bd63f3148b649 /formula
parent53e4b24c9ee9f2114bbc6b820ece4c469cd811d5 (diff)
fix memory leak around function descriptions
Found by Lsan. Change-Id: Ia443ed6eb2a20854998a615f3c2bd9fdac156a8c
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)
{