summaryrefslogtreecommitdiff
path: root/ucb/source/cacher
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-07-24 23:09:24 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-07-25 10:09:15 +0900
commita8b395bff2111d7bf086b4cb44081dce10cca364 (patch)
treeec4a4ebebe94fcd58b9c8508b8c403e32a2a9cfc /ucb/source/cacher
parent4f2f53e267956e68fac768391c9b83d45adbc29f (diff)
Avoid possible memory leaks in case of exceptions
Change-Id: I9983e858c4e634b4cac8ad42fa9b06b7ccc167d6
Diffstat (limited to 'ucb/source/cacher')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 7cf70060b213..954aa09feaa6 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -28,6 +28,7 @@
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
#include <comphelper/processfactory.hxx>
+#include <boost/scoped_ptr.hpp>
using namespace com::sun::star::beans;
using namespace com::sun::star::lang;
@@ -475,7 +476,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
if( nFetchDirection != -1 )
nDeleted++;
- Sequence< Property >* pOrigProps = new Sequence<Property> ( *m_pProperties );
+ boost::scoped_ptr<Sequence< Property > > pOrigProps(new Sequence<Property> ( *m_pProperties ));
sal_Int32 nOrigProps = pOrigProps->getLength();
m_pProperties->realloc( nOrigProps + 2 - nDeleted );//note that nDeleted is <= 2
@@ -513,7 +514,6 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
m_nFetchDirectionPropertyHandle = rMyProp.Handle;
}
- delete pOrigProps;
}
CCRS_PropertySetInfo::~CCRS_PropertySetInfo()