diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-01 20:58:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-02 10:46:12 +0200 |
commit | b4d9f5d4d6475565530d8f698bd8f72fc685b491 (patch) | |
tree | 4940ece00f2412cca1341fdf80ebe955b7a42f2d /sot | |
parent | da6f7f19b6d48189ea6a34ab7c2fb67fa40ca743 (diff) |
coverity#1418672 silence Explicit null deref
Change-Id: I9c39da02a344316b09c190a3c12bdb17201cf176
Reviewed-on: https://gerrit.libreoffice.org/43027
Tested-by: Jenkins <ci@libreoffice.org>
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/stgio.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index 15774bf64a2b..44b245f5f01d 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -89,6 +89,7 @@ void StgIo::SetupStreams() m_pDataStrm = nullptr; m_pFAT = nullptr; ResetError(); + short nPhysPageSize = 1 << m_aHdr.GetPageSize(); SetPhysPageSize(nPhysPageSize); sal_Int32 nFatStrmSize; @@ -98,12 +99,11 @@ void StgIo::SetupStreams() SetError(SVSTREAM_FILEFORMAT_ERROR); m_pFAT = nullptr; m_pTOC = nullptr; + return; } - else - { - m_pFAT = new StgFATStrm(*this, nFatStrmSize); - m_pTOC = new StgDirStrm( *this ); - } + + m_pFAT = new StgFATStrm(*this, nFatStrmSize); + m_pTOC = new StgDirStrm(*this); if( !GetError() ) { StgDirEntry* pRoot = m_pTOC->GetRoot(); |