summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-14 11:45:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-08-14 13:27:42 +0200
commitc79c5d8066538001959f18cab81f74bd6dacf4c8 (patch)
tree44ffff41643ae1cb75186c888e48d2bb8bc35b62 /basic/source
parentc59fba2682f01306f3398afeb86f2e3027e011ec (diff)
tdf#92446: Revert apparently bogus attempt at fixing a memory leak
6b4c596b01039324cfe78f38c4e3ffb9080bcd34 "Fix memory leak for BASIC sub (as well as void function)," from just looking at the few lines of code in isolation, and their revision history, looked like a plausible and effective approach to fix the leaks reported by CppunitTest_basci_vba when run under lsan. However, tdf#92446 indicates that that innocent-looking change had rather dire consequences. So revert it and leave a fix for the memory leak to somebody who actually understands all this code. Change-Id: Ic81b1c14a1cfb07c6ec4415cc26b2f826adbc8ca (cherry picked from commit 9d094b9f0a05d2ea62181201efb8f9e46ecfc8f1)
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/classes/sbxmod.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 568340e6782b..e6375e272905 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2142,13 +2142,8 @@ void SbMethod::Broadcast( sal_uIntPtr nHintId )
if( mpPar.Is() )
{
// Enregister this as element 0, but don't reset the parent!
- switch( GetType() ) {
- case SbxEMPTY:
- case SbxVOID:
- break;
- default:
+ if( GetType() != SbxVOID ) {
mpPar->PutDirect( pThisCopy, 0 );
- break;
}
SetParameters( NULL );
}