--- a/wim/WimClient/src/WimCert.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimClient/src/WimCert.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -330,10 +330,8 @@
else
{
TCertificateAddressList certRefLst =
- new( ELeave ) TCertificateAddress[iCertCount];
-
- CleanupStack::PushL( TCleanupItem( CleanupRefLst,
- certRefLst ) );
+ new( ELeave ) TCertificateAddress[ iCertCount ];
+ CleanupStack::PushL( TCleanupItem( CleanupRefLst, certRefLst ) );
TWimCertInfo* certInfoArr = new( ELeave )
TWimCertInfo[iCertCount];
@@ -681,13 +679,14 @@
// -----------------------------------------------------------------------------
// CWimCert::CleanupRefLst()
-// Handles cleanup for an object which is not derived from CBase
+// Handles cleanup of an TCertificateAddressList array
// -----------------------------------------------------------------------------
//
void CWimCert::CleanupRefLst( TAny* aObject )
{
_WIMTRACE ( _L( "CWimCert::CleanupRefLst()" ) );
- delete[] aObject;
+ TCertificateAddressList* certRefLst = static_cast< TCertificateAddressList* >( aObject );
+ delete[] certRefLst;
aObject = NULL;
}