Apache OpenOffice (AOO) Bugzilla – Issue 120867
In SfxLibraryContainer::storeLibraries_Impl(), the created pLibArray object need free before returning from branch code
Last modified: 2013-07-12 10:54:49 UTC
in api void SfxLibraryContainer::storeLibraries_Impl(), in some cases it returns from branch code, while the created ::xmlscript::LibDescriptorArray object is not freed. // Methods of new XLibraryStorage interface? void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XStorage >& xStorage, sal_Bool bComplete ) { ... ::xmlscript::LibDescriptorArray* pLibArray = new ::xmlscript::LibDescriptorArray( nLibsToSave ); ... // Don't write if only empty standard lib exists if ( ( nNameCount == 1 ) && ( aNames[0].equalsAscii( "Standard" ) ) ) { Any aLibAny = maNameContainer.getByName( aNames[0] ); Reference< XNameAccess > xNameAccess; aLibAny >>= xNameAccess; if ( !xNameAccess->hasElements() ) // no free pLibArray action in this branch code return; } ... delete pLibArray; }
"zhangjf" committed SVN revision 1382647 into trunk: #i120867#, in SfxLibraryContainer::storeLibraries_Impl(),need to free created...
Created attachment 79370 [details] fix code patch In SfxLibraryContainer::storeLibraries_Impl(),need to free created pLibArray object before returning from branch code.
change to resolved state