diff -r 3553901f7fa8 -r 1f776524b15c telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp --- a/telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp Tue Feb 02 01:41:59 2010 +0200 +++ b/telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp Fri Mar 19 09:55:57 2010 +0200 @@ -142,6 +142,8 @@ // set the pointer to the message router object messageManager->SetMessageRouter( iMessageRouter ); + // Ownership of messageManager passed to iPhoneTsy. + CleanupStack::Pop( messageManager ); // Create Phone Tsy (which creates the whole Common TSY) TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - Starting to open CommonTSY"); iPhoneTsy = CMmPhoneTsy::NewL( @@ -149,14 +151,9 @@ if ( iPhoneTsy ) { - CleanupStack::Pop( messageManager ); TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - CommonTSY successfully opened"); messageManager->SetPhoneTsy( iPhoneTsy ); } - else - { - CleanupStack::PopAndDestroy( messageManager ); - } } else {