diff -r e06095241a65 -r 735de8341ce4 vpnengine/vpnmanager/src/pkiutil.cpp --- a/vpnengine/vpnmanager/src/pkiutil.cpp Wed Sep 01 12:23:21 2010 +0100 +++ b/vpnengine/vpnmanager/src/pkiutil.cpp Tue Sep 14 23:16:15 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -251,7 +251,9 @@ HBufC8* certData = HBufC8::NewL(KExpectedMaxCertSize); HBufC8* subjectNameString; + _LIT8(KEmptyString, ""); + CleanupStack::PushL(certData); TPtr8 certDataPtr = certData->Des(); @@ -283,7 +285,6 @@ aPkiService.Finalize(opContext); } - // Make sure that the cert, if found, is valid if (status.Int() == KErrNone) { @@ -292,6 +293,7 @@ else //if not found, check wether certificate chain exists { certStatus = ECertNotFound; + //checking if certificate chain is found CleanupStack::PopAndDestroy(); // certData @@ -711,7 +713,7 @@ for (TInt i = 0; i < certListArray->Count(); ++i) { - TCertificateListEntry entry = (*certListArray)[i]; + TCertificateListEntry& entry = (*certListArray)[i]; if (entry.iOwnerType == EPKICACertificate) { CX509Certificate* cert = ReadCertificateLC(aPkiService, @@ -847,6 +849,7 @@ break; } } + CleanupStack::PopAndDestroy(rfc822Name); CleanupStack::PopAndDestroy(subjectName);