emailservices/emailstore/message_store/client/src/RMessageStoreSession.cpp
changeset 76 38bf5461e270
parent 68 83cc6bae1de8
--- a/emailservices/emailstore/message_store/client/src/RMessageStoreSession.cpp	Thu Sep 30 11:43:07 2010 +0300
+++ b/emailservices/emailstore/message_store/client/src/RMessageStoreSession.cpp	Thu Oct 14 17:33:43 2010 +0300
@@ -450,7 +450,9 @@
 	for ( int i = 0 ; i < count ; i++ )
 		{
 		CMsgStoreAccount* account = CMsgStoreAccount::NewL( ownerIds[i], *(names[i]) );
+		CleanupStack::PushL( account );
 		aAccounts.AppendL( account );
+		CleanupStack::Pop( account );
 		}
 	CleanupStack::PopAndDestroy( serializer );
 	CleanupStack::PopAndDestroy( &resultBuf );
@@ -1718,7 +1720,9 @@
     
         //create the address object and add it to the output array
         CMsgStoreAddress *address = CMsgStoreAddress::NewL( addrDes16, nameDes16 );
-        aAddressArray.AppendL( address );            
+        CleanupStack::PushL( address );
+        aAddressArray.AppendL( address );
+        CleanupStack::Pop( address );
         } // end while          
     
     CleanupStack::PopAndDestroy( &serializedBuf );