accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp
branchRCL_3
changeset 9 21e939dd208a
parent 0 4e1aa6a622a0
child 20 1ddbe54d0645
--- 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 );