From 5340c53443fc2b2056146799a1156748433be078 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 4 Nov 2018 16:02:27 +0000 Subject: coverity#1440843 help coverity out wrt Wrapper object use after free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2f03cd950d37fc00ab4fe71693e717e82f242254 Reviewed-on: https://gerrit.libreoffice.org/62851 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sot/source/sdstor/stgdir.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sot') 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; -- cgit