summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-27 16:18:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-06-27 20:25:10 +0200
commitae1b0875b2d65513ff013054d6e04aa7f715eaa4 (patch)
treee695ce3c5214f2d4be7ee78efd79cb38cb26ed0e /sd
parentacb71f8382004595778ba3f265c40dd46d72d125 (diff)
cid#1464973 & cid#1464975 Resource leak
Change-Id: I4df8fefa7f875e0a25585c4fef22f077dcd0b83d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97318 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/sdpptwrp.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 3fbbcea1b772..7b6876af7535 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -83,8 +83,8 @@ static void lcl_getListOfStreams(SotStorage * pStorage, comphelper::SequenceAsHa
OUString sStreamFullName = sPrefix.getLength() ? sPrefix + "/" + aElement.GetName() : aElement.GetName();
if (aElement.IsStorage())
{
- SotStorage * pSubStorage = pStorage->OpenSotStorage(aElement.GetName(), StreamMode::STD_READ | StreamMode::SHARE_DENYALL);
- lcl_getListOfStreams(pSubStorage, aStreamsData, sStreamFullName);
+ tools::SvRef<SotStorage> xSubStorage = pStorage->OpenSotStorage(aElement.GetName(), StreamMode::STD_READ | StreamMode::SHARE_DENYALL);
+ lcl_getListOfStreams(xSubStorage.get(), aStreamsData, sStreamFullName);
}
else
{
@@ -306,7 +306,7 @@ bool SdPPTFilter::Export()
{
// To avoid long paths split and open substorages recursively
// Splitting paths manually, since comphelper::string::split is trimming special characters like \0x01, \0x09
- SotStorage * pStorage = xEncryptedRootStrg.get();
+ tools::SvRef<SotStorage> pStorage = xEncryptedRootStrg.get();
OUString sFileName;
sal_Int32 idx = 0;
do