ipsservices/ipssosplugin/src/ipsplgcreatereplymessageoperation.cpp
changeset 76 38bf5461e270
parent 23 2dc6caa42ec3
--- a/ipsservices/ipssosplugin/src/ipsplgcreatereplymessageoperation.cpp	Thu Sep 30 11:43:07 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgcreatereplymessageoperation.cpp	Thu Oct 14 17:33:43 2010 +0300
@@ -139,10 +139,9 @@
         for( TInt i = 0; i < toRecipientCount; i++ )
             {
             emailAddr = header->ToRecipients()[i].AllocLC();
-            fsAddr = CFSMailAddress::NewLC();
+            fsAddr = CFSMailAddress::NewL();
             fsAddr->SetEmailAddress( *emailAddr ); // Copy created
             newMessage->AppendToRecipient( fsAddr ); // No copy
-            CleanupStack::Pop( fsAddr ); // fsAddr belong now to fsMsg
             CleanupStack::PopAndDestroy( emailAddr ); // emailAddr not used
             }
 
@@ -238,6 +237,7 @@
                     }
                 }
            
+            CleanupStack::Pop( fsAddr ); // fsAddr belong now to fsMsg
             if( present )
                 {
                 aNewMessage->AppendToRecipient( fsAddr ); // No copy
@@ -247,7 +247,6 @@
                 aNewMessage->AppendCCRecipient( fsAddr ); // No copy
                 }
            
-            CleanupStack::Pop( fsAddr ); // fsAddr belong now to fsMsg
             CleanupStack::PopAndDestroy( emailAddr ); // emailAddr not used
             }
         CleanupStack::PopAndDestroy( tmpHeader );
@@ -258,10 +257,9 @@
     for( TInt i = 0; i < aHeader->BccRecipients().Count(); i++ )
         {
         emailAddr = aHeader->BccRecipients()[i].AllocLC();
-        fsAddr = CFSMailAddress::NewLC();
+        fsAddr = CFSMailAddress::NewL();
         fsAddr->SetEmailAddress( *emailAddr ); // Copy created
         aNewMessage->AppendBCCRecipient( fsAddr ); // No copy
-        CleanupStack::Pop( fsAddr ); // fsAddr belong now to fsMsg
         CleanupStack::PopAndDestroy( emailAddr ); // emailAddr not used
         }
     }