cryptoservices/certificateandkeymgmt/wtlscert/wtlscertchainao.cpp
changeset 108 ca9a0fc2f082
parent 8 35751d3474b7
--- a/cryptoservices/certificateandkeymgmt/wtlscert/wtlscertchainao.cpp	Wed Oct 06 11:09:48 2010 +0530
+++ b/cryptoservices/certificateandkeymgmt/wtlscert/wtlscertchainao.cpp	Sat Oct 30 16:29:23 2010 +0530
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1998-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"
@@ -449,7 +449,10 @@
 	//are we guarenteed that a cert from the store is a valid WTLScert?
 	//ie is this going to leave for reasons other than OOM?
 	CWTLSCertificate *cert = CWTLSCertificate::NewL( iEncodedCert );
+
+	CleanupStack::PushL(cert);
 	User::LeaveIfError( iRootsFromStore.Append(cert) );
+	CleanupStack::Pop(cert);
 
 	iState = ERetrieveRoots;
 	TRequestStatus* status = &iStatus;