fixing memory leak, add delete before return
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 27 Mar 2010 06:37:11 +0000 (06:37 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 27 Mar 2010 06:37:11 +0000 (06:37 +0000)
PWG4/omega3pi/AliAnalysisTaskOmegaPi0PiPi.cxx

index d72ff9d1aabc401ff829f36f7b743ec67381a68c..d00996209f58b17a6ef2e122d6aa68d4b19b9348 100644 (file)
@@ -142,8 +142,10 @@ void AliAnalysisTaskOmegaPi0PiPi::UserExec(Option_t* /* option */)
   
   const Int_t kNumberOfPhosClusters   = caloClustersArr->GetEntries() ;
   AliDebug(2,Form("CaloClusters: %d\n", kNumberOfPhosClusters));
-  if(kNumberOfPhosClusters<2) return;
-  
+  if(kNumberOfPhosClusters<2){
+    delete caloClustersArr;
+    return;
+  }  
   TLorentzVector pc1; //4-momentum of PHOS cluster 1
   TLorentzVector pc2; //4-momentum of PHOS cluster 2
   TLorentzVector pc12;