--- a/networksecurity/tlsprovider/source/tlsprovider/Ctlsbrowsetoken.cpp Thu Sep 16 13:48:44 2010 +0530
+++ b/networksecurity/tlsprovider/source/tlsprovider/Ctlsbrowsetoken.cpp Thu Sep 23 17:23:35 2010 +0530
@@ -183,7 +183,10 @@
if ( !tempObj || iListAllTokensAndTypes->Append(*tempObj) != KErrNone )
{
delete tempObj;
+ if (iTokenHandle)
+ {
iTokenHandle->Release();
+ }
iTokenHandle = NULL;
User::Leave( KErrNoMemory );
}
@@ -192,7 +195,10 @@
Tokens.iTokenInfo = new CTokenInfo;
if ( !Tokens.iTokenInfo )
{
+ if (iTokenHandle)
+ {
iTokenHandle->Release();
+ }
iTokenHandle = NULL;
User::Leave( KErrNoMemory );
}
@@ -307,24 +313,39 @@
switch (iCurrentState)
{
case EGetTokenList:
+ {
+ if (iPtrTokenType)
iPtrTokenType->CancelList();
+ }
break;
case EOpenToken:
+ {
+ if (iPtrTokenType)
iPtrTokenType->CancelOpenToken();
+ }
break;
case EGetProviderInterface:
+ {
+ if (iTokenHandle)
iTokenHandle->CancelGetInterface();
+ }
break;
case EGetSessionInterface:
+ {
+ if (iTokenProvider)
(iTokenProvider->Token()).CancelGetInterface();
+ }
break;
case EGetCiphers:
+ if (iTokenInterface)
+ {
MTLSTokenProvider* provider = static_cast<MTLSTokenProvider*>(iTokenInterface);
provider->CancelCryptoCapabilities();
+ }
break;
}