summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-09 17:10:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-10 08:30:21 +0200
commit65e41592a650887c8d00586385119effa54de5fa (patch)
tree4b0f6c7f52159d9cf70c561c815f623d3b57198d /desktop
parentuse std::uniqueptr in HandledTextToken (diff)
downloadcore-65e41592a650887c8d00586385119effa54de5fa.tar.gz
core-65e41592a650887c8d00586385119effa54de5fa.zip
pass SvStream around by std::unique_ptr
and give utl::OStreamWrapper a new constructor so that it knows it is taking ownership of the SvStream, which appears to fix several leaks Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b Reviewed-on: https://gerrit.libreoffice.org/57187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 3a0f4bd1c165..683813a9df48 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -107,7 +107,7 @@ namespace migration
bool IsUserWordbook( const OUString& rFile )
{
bool bRet = false;
- SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( rFile, StreamMode::STD_READ );
+ std::unique_ptr<SvStream> pStream = ::utl::UcbStreamHelper::CreateStream( rFile, StreamMode::STD_READ );
if ( pStream && !pStream->GetError() )
{
static const sal_Char* const pVerOOo7 = "OOoUserDict1";
@@ -137,7 +137,6 @@ bool IsUserWordbook( const OUString& rFile )
}
}
- delete pStream;
return bRet;
}