policymanagement/policyengine/centreptoolserver/src/CentRepToolServer.cpp
changeset 73 ae69c2e8bc34
parent 0 b497e44ab2fc
--- a/policymanagement/policyengine/centreptoolserver/src/CentRepToolServer.cpp	Tue Sep 28 17:53:08 2010 +0530
+++ b/policymanagement/policyengine/centreptoolserver/src/CentRepToolServer.cpp	Fri Oct 15 11:46:45 2010 +0530
@@ -428,14 +428,16 @@
 	
 	//add new CTrustedSession object into container and object index
 	CRepositorySession * repositorySession = CRepositorySession::NewL( repositoryUid);
-	
+	CleanupStack::PushL(repositorySession);
+		
 	iContainer->AddL( repositorySession);
 	TInt handle = iRepositorySessions->AddL( repositorySession);
 
 	//transmit handle to client 
 	TPckg<TInt> handlePckg(handle);
 	TRAPD( r, aMessage.WriteL(3, handlePckg))
-
+	CleanupStack::Pop( repositorySession ); //repositorySession	
+		
 	if ( r != KErrNone)
 		{
 		iRepositorySessions->Remove(handle);