sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp
changeset 54 e4420734a2a0
parent 37 0295359a7673
--- a/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp	Fri Sep 03 14:18:25 2010 +0300
+++ b/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp	Tue Oct 19 05:33:24 2010 +0530
@@ -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