sot/source/sdstor/stg.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit f4ccf5da912a8cb33971cfd2f2276e90a0571d0b
Author: Caolán McNamara <[email protected]>
AuthorDate: Sun Aug 28 14:55:51 2022 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Sun Aug 28 21:12:21 2022 +0200
cid#1500658 silence Resource leak
Change-Id: I799c44990d2a2cca3b843c3c64774d4d49e4a8b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138946
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 08af343092fa..cebade94f654 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -579,6 +579,7 @@ BaseStorage* Storage::OpenStorage( const OUString& rName,
StreamMode m, bool bDi
if( p && p->m_aEntry.GetType() != STG_STORAGE )
{
pIo->SetError( SVSTREAM_FILE_NOT_FOUND );
+ // coverity[overwrite_var] - ownership is not here, but with StgDirStrm
p = nullptr;
}