Author: zhangjf Date: Mon Sep 10 06:04:00 2012 New Revision: 1382647 URL: http://svn.apache.org/viewvc?rev=1382647&view=rev Log: #i120867#, in SfxLibraryContainer::storeLibraries_Impl(),need to free created pLibArray object before returning from branch code
Found by: zhangjf Patch by: zhangjf Modified: incubator/ooo/trunk/main/basic/source/uno/namecont.cxx Modified: incubator/ooo/trunk/main/basic/source/uno/namecont.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/basic/source/uno/namecont.cxx?rev=1382647&r1=1382646&r2=1382647&view=diff ============================================================================== --- incubator/ooo/trunk/main/basic/source/uno/namecont.cxx (original) +++ incubator/ooo/trunk/main/basic/source/uno/namecont.cxx Mon Sep 10 06:04:00 2012 @@ -1816,8 +1816,10 @@ void SfxLibraryContainer::storeLibraries Any aLibAny = maNameContainer.getByName( aNames[0] ); Reference< XNameAccess > xNameAccess; aLibAny >>= xNameAccess; - if ( !xNameAccess->hasElements() ) + if ( !xNameAccess->hasElements() ){ + delete pLibArray; return; + } } // create the empty target storage