summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-04 16:02:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-04 22:03:38 +0100
commit5340c53443fc2b2056146799a1156748433be078 (patch)
treee273aeb2261ad7b4a6dfe104545593431b87a16c /sot
parent7992e3f73e169175067fe31e9a89900161ed4e9a (diff)
coverity#1440843 help coverity out wrt Wrapper object use after free
Change-Id: I2f03cd950d37fc00ab4fe71693e717e82f242254 Reviewed-on: https://gerrit.libreoffice.org/62851 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgdir.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 6f52a38475d6..83c3f69f62fc 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -658,10 +658,9 @@ bool StgDirEntry::Tmp2Strm()
{
m_pStgStrm->SetSize( 0 );
delete m_pStgStrm;
- m_pStgStrm = pNewStrm.get();
- pNewStrm->SetEntry( *this );
- pNewStrm->Pos2Page( m_nPos );
- pNewStrm.release();
+ m_pStgStrm = pNewStrm.release();
+ m_pStgStrm->SetEntry(*this);
+ m_pStgStrm->Pos2Page(m_nPos);
delete m_pTmpStrm;
delete m_pCurStrm;
m_pTmpStrm = m_pCurStrm = nullptr;