installationservices/swi/source/swis/server/planner.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
--- a/installationservices/swi/source/swis/server/planner.cpp	Tue Aug 31 15:21:33 2010 +0300
+++ b/installationservices/swi/source/swis/server/planner.cpp	Wed Sep 01 12:22:02 2010 +0100
@@ -355,6 +355,7 @@
 	{
 	// We are removing items from array (aProcessPackages)and thus require index 
 	// adjustment. But if loop run in reverse order there is no need to adjust the index
+	CleanupResetAndDestroyPushL(aPlannedPackages);
 	for (TInt i = aProcessPackages.Count() - 1; i >= 0; --i)
 		{
 		// Ignore already added package
@@ -397,6 +398,7 @@
 		aProcessPackages.Remove(i);
 		CleanupStack::PopAndDestroy(&registryEntry);
 		}
+	CleanupStack::Pop(&aPlannedPackages);
 	}
 
 /**
@@ -519,6 +521,7 @@
             User::Leave(err);
 		    }
 		}
+
 	CleanupStack::Pop(rootApplication);
 	
 	return rootApplication;
@@ -533,13 +536,14 @@
  */
 void CPlanner::ConfirmForUninstallL(CUninstallationNode& aNode, RPointerArray<CSisRegistryPackage>& aPlannedPackages)
 	{
+	CleanupResetAndDestroyPushL(aPlannedPackages);
 	aNode.SetIsPlanned(ETrue);
 
 	// aNode owns package therefore to transfer the ownership
 	// a copy of CSisRegistryPackage is made.
 	CSisRegistryPackage* package = CSisRegistryPackage::NewLC(aNode.PackageL());
 	aPlannedPackages.AppendL(package);
-	CleanupStack::Pop(package);
+	CleanupStack::Pop(2, &aPlannedPackages);
 	}
 
 /**