sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp
changeset 51 8134400f8f89
parent 39 7cdef8deefa0
--- a/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp	Fri Sep 17 08:32:30 2010 +0300
+++ b/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp	Mon Oct 04 00:41:02 2010 +0300
@@ -840,11 +840,22 @@
                     CSIPProfile* profile = NULL;
                     profile = registry->ProfileL( 
                         iDatas[counter]->GetProfileId() );
+                    CleanupStack::PushL( profile );
                     CSIPManagedProfile* managedProfile = 
                         static_cast<CSIPManagedProfile*>( profile );
+                    
+                    CleanupStack::PushL( managedProfile ); 
+                    
                     managedProfile->SetParameter( 
                         KSIPSnapId, (TUint32)snapId );
                     registry->SaveL( *managedProfile );
+                    
+                    CleanupStack::PopAndDestroy(managedProfile);
+                        
+                    CleanupStack::Pop( profile );
+                    profile = NULL;
+                       
+                    
                     CleanupStack::PopAndDestroy( 2, observer ); // CS:0
                     }
                 else