diff -r 6a787171e1de -r 13fd6fd25fe7 commonappservices/alarmserver/Client/Source/ASCliSession.cpp --- a/commonappservices/alarmserver/Client/Source/ASCliSession.cpp Fri May 14 16:01:13 2010 +0300 +++ b/commonappservices/alarmserver/Client/Source/ASCliSession.cpp Thu May 27 13:01:09 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-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" @@ -742,6 +742,7 @@ */ EXPORT_C void RASCliSession::GetAvailableCategoryListL(RArray& aCategories) const { + CleanupClosePushL(aCategories); // First step is to build the transfer buffer in the server // and get the size (in bytes) so that we know // how big to make the client-side (corresponding) temporary one. @@ -768,6 +769,8 @@ // stream.Close(); CleanupStack::PopAndDestroy(2, buffer); + // relieve the ownership of the array to the caller + CleanupStack::Pop(&aCategories); } @@ -1328,6 +1331,7 @@ */ void RASCliSession::FetchAlarmIdsFromBufferL(RArray& aAlarmIds, TInt aBufferSize) const { + CleanupClosePushL(aAlarmIds); CBufBase* buffer = FetchTransferBufferLC(aBufferSize); // The buffer just contains serialized TAlarmId's so we need to @@ -1344,6 +1348,8 @@ } // CleanupStack::PopAndDestroy(2, buffer); + // relieve the ownership of the array to the caller + CleanupStack::Pop(&aAlarmIds); } /**