cryptoservices/filebasedcertificateandkeystores/source/keystore/Server/CKeyDataManager.cpp
branchRCL_3
changeset 58 a5e05e7296f9
parent 45 030c4fbc13d7
child 61 641f389e9157
--- a/cryptoservices/filebasedcertificateandkeystores/source/keystore/Server/CKeyDataManager.cpp	Wed Jun 09 11:39:05 2010 +0300
+++ b/cryptoservices/filebasedcertificateandkeystores/source/keystore/Server/CKeyDataManager.cpp	Mon Jun 21 17:40:35 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-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"
@@ -77,12 +77,14 @@
 	TInt count = lookupStream.ReadInt32L();
 	for (TInt index = 0; index < count; index++)
 		{
-		const CFileKeyData* keyData = CFileKeyData::NewL(lookupStream);
+		CFileKeyData* keyData = CFileKeyData::NewL(lookupStream);
+		CleanupStack::PushL(keyData);
 
 		if (keyData->Handle() > iKeyIdentifier)
 			iKeyIdentifier = keyData->Handle();
 
-		iKeys.Append(keyData);
+		iKeys.AppendL(keyData);
+		CleanupStack::Pop(keyData);
 		}
 	
 	CleanupStack::PopAndDestroy(&lookupStream);