summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJian Fang Zhang <zhangjf@apache.org>2012-09-10 05:04:00 +0000
committerJian Fang Zhang <zhangjf@apache.org>2012-09-10 05:04:00 +0000
commitf0ffbebd4771ccbbf4ce17a427c2eec1732b8cf4 (patch)
tree451c12d3448fc2f6cdf7c5ee953172337ca6fa61
parent5c413ad6d8c2b2e16c19ff007e5315b383b73eb5 (diff)
#i120867#, in SfxLibraryContainer::storeLibraries_Impl(),need to free created pLibArray object before returning from branch code
Found by: zhangjf Patch by: zhangjf
Notes
Notes: prefer: 02d609ca991b044e584b24054d43ecf70668444e
-rw-r--r--basic/source/uno/namecont.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 7bce542dfe32..7ddefde6da99 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1816,8 +1816,10 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
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