diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-23 11:56:08 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-07-23 16:31:41 +0200 |
commit | 036d8cb359c3d08793ed371c554a3ce3196f725d (patch) | |
tree | c3a7066dccebe6c45630d05b027a13b6569791ec /sfx2 | |
parent | 0549b5dded97cd6b315531baf50a874f5bb53155 (diff) |
crashtesting: ooo72057-1.doc
fallout from
commit 65e41592a650887c
pass SvStream around by std::unique_ptr
The backtrace where it was was freeing the SvStream we need is below,
the code seems dodgy because it is re-creating the underlying SvStream. Before
65e41592a650887c, it just leaked the SvStream.
0 SvStream::~SvStream()
at tools/source/stream/stream.cxx:369
1 SvFileStream::~SvFileStream()
at tools/source/stream/strmunx.cxx:300
2 SvFileStream::~SvFileStream()
at tools/source/stream/strmunx.cxx:298
3 std::default_delete<SvStream>::operator()(SvStream*) const
4 std::unique_ptr<SvStream, std::default_delete<SvStream> >::reset(SvStream*)
5 std::unique_ptr<SvStream, std::default_delete<SvStream> >::operator=(std::unique_ptr<SvStream, std::default_delete<SvStream> >&&)
6 SfxMedium::GetMedium_Impl()
at sfx2/source/doc/docfile.cxx:2603
7 SfxMedium::GetInputStream()
at sfx2/source/doc/docfile.cxx:3329
8 ImportExcel8::ReadBasic()
at sc/source/filter/excel/excimp8.cxx:391
9 ImportExcel8::PostDocLoad()
at sc/source/filter/excel/excimp8.cxx:425
10 ImportExcel8::Read() (this=0x4727a10)
at sc/source/filter/excel/read.cxx:1298
11 ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT)
at sc/source/filter/excel/excel.cxx:142
Change-Id: I4fb769a7da71ef9a27ddef1581448efb3d303bde
Reviewed-on: https://gerrit.libreoffice.org/57843
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 56a976572e25..ced74fa616e2 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2597,7 +2597,7 @@ void SfxMedium::GetMedium_Impl() if ( !GetError() && !pImpl->xStream.is() && !pImpl->xInputStream.is() ) SetError(ERRCODE_IO_ACCESSDENIED); - if ( !GetError() ) + if ( !GetError() && !pImpl->m_pInStream ) { if ( pImpl->xStream.is() ) pImpl->m_pInStream = utl::UcbStreamHelper::CreateStream( pImpl->xStream ); |