summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr/formcomponenthandler.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-04-02 16:08:04 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-04-02 16:09:11 +0900
commit8f7c677dbba29123c48778a1024a535f36bca183 (patch)
tree3123165f84a6bd7475d7311e75f59eed18b14450 /extensions/source/propctrlr/formcomponenthandler.cxx
parent7fcab08f36fe8bceeab7235e3b83cddeb06fd103 (diff)
Avoid possible resource leaks by boost::scoped_array
Change-Id: Ibf92b3098c50388d8b6d27f4476e613a1f8918b5
Diffstat (limited to 'extensions/source/propctrlr/formcomponenthandler.cxx')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index b6f5724f69ac..bc0f6e5234b2 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -100,6 +100,7 @@
#include <sal/macros.h>
#include <limits>
+#include <boost/scoped_array.hpp>
#define GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
@@ -381,7 +382,7 @@ namespace pcr
sal_Int32 nNewCount = aNewStrings.getLength();
// Create new Ids
- OUString* pNewPureIds = new OUString[nNewCount];
+ boost::scoped_array<OUString> pNewPureIds(new OUString[nNewCount]);
OUString aIdStrBase = aDot;
Any aNameAny = m_xComponent->getPropertyValue(PROPERTY_NAME);
OUString sControlName;
@@ -478,7 +479,6 @@ namespace pcr
{}
}
}
- delete[] pNewPureIds;
}
}
}