--- a/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp Tue Apr 27 17:57:16 2010 +0300
@@ -254,17 +254,18 @@
TPtr8 ptrBuf( buf->Des() );
User::LeaveIfError( session.Connect() );
+ CleanupClosePushL ( session );
User::LeaveIfError( file.Open( session, KHWDevicesFile, EFileRead ) );
file.Read( ptrBuf );
file.Close();
- session.Close();
TLex8 l( ptrBuf );
TInt32 temp;
l.Val( temp );
settings = static_cast< TUint32 >( temp );
- CleanupStack::Pop( buf );
+ CleanupStack::PopAndDestroy ( &session );
+ CleanupStack::PopAndDestroy ( buf );
COM_TRACE_1( "[AccFW:AccServer] CAccSrvSettingsHandler::GetSupportedHWDevicesL() - return %d", settings );