cryptoservices/certificateandkeymgmt/tx509/extensiontest.cpp
branchRCL_3
changeset 79 a5e05e7296f9
parent 8 35751d3474b7
child 95 641f389e9157
--- a/cryptoservices/certificateandkeymgmt/tx509/extensiontest.cpp	Wed Jun 09 11:39:05 2010 +0300
+++ b/cryptoservices/certificateandkeymgmt/tx509/extensiontest.cpp	Mon Jun 21 17:40:35 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -135,11 +135,13 @@
 		// if it exists.
 		TPtrC str = Input::ParseElement(aBuf, aTag, pos, err);
 		if (err >= 0)
-			{			
-			aStrings.Append(str.AllocL());
+			{
+			HBufC* string = str.AllocLC();			
+			aStrings.AppendL(string);
+			CleanupStack::Pop(string);
 			}								
 		}
-	while (err >= 0);	
+	while (err >= 0);
 	}
 
 void CExtensionTest::BuildIntList(RArray<TInt>& aInts, const TDesC& aBuf, const TDesC& aTag)
@@ -153,7 +155,9 @@
 		TInt n = Input::ParseIntElement(aBuf, aTag, pos, err);
 		if (err >= 0)
 			{
-			aInts.Append(n);
+			// This append should not fail as the parsing went fine. 
+			// So, ignoring the leave just to satisfy non leaving method convention.
+			TRAP_IGNORE(aInts.AppendL(n));
 			}								
 		}
 	while (err >= 0);