diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-17 18:50:43 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-17 19:09:23 +0100 |
commit | a62303c13161b5fbe620d69aa82f02997fe41bee (patch) | |
tree | 135545a211b505670e410eefbf47274ea82267df /sc | |
parent | coverity: fix memory leak (diff) | |
download | core-a62303c13161b5fbe620d69aa82f02997fe41bee.tar.gz core-a62303c13161b5fbe620d69aa82f02997fe41bee.zip |
coverity: fix memory leak
Change-Id: I57937130d6ef40743c1b13d107888883a6810a8d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmldpimp.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldpimp.hxx | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index ac42282316c7..8b269afd9348 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -112,7 +112,6 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), pDoc(GetScImport().GetDocument()), pDPObject(NULL), - pDPSave(NULL), pDPDimSaveData(NULL), sDataPilotTableName(), sApplicationData(), @@ -216,7 +215,7 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, } pDPObject = new ScDPObject(pDoc); - pDPSave = new ScDPSaveData(); + pDPSave.reset(new ScDPSaveData()); } ScXMLDataPilotTableContext::~ScXMLDataPilotTableContext() diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx index b37b2665fe4b..0f722dd89785 100644 --- a/sc/source/filter/xml/xmldpimp.hxx +++ b/sc/source/filter/xml/xmldpimp.hxx @@ -79,7 +79,7 @@ class ScXMLDataPilotTableContext : public SvXMLImportContext }; ScDocument* pDoc; ScDPObject* pDPObject; - ScDPSaveData* pDPSave; + boost::scoped_ptr<ScDPSaveData> pDPSave; ScDPDimensionSaveData* pDPDimSaveData; GrandTotalItem maRowGrandTotal; GrandTotalItem maColGrandTotal; |