Fix mismatched new/delete
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Nov 2008 12:10:48 +0000 (12:10 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Nov 2008 12:10:48 +0000 (12:10 +0000)
HMPID/AliHMPIDRecon.cxx
PMD/AliPMDClusterFinder.cxx

index e8cb828..3bbaf6d 100644 (file)
@@ -60,7 +60,7 @@ void AliHMPIDRecon::InitVars(Int_t n)
 //..
 //Init some variables
 //..
-  if(n<0) return;
+  if(n<=0) return;
   fPhotFlag = new Int_t[n];
   fPhotCkov = new Double_t[n];
   fPhotPhi  = new Double_t[n];
@@ -73,10 +73,10 @@ void AliHMPIDRecon::DeleteVars()const
 //..
 //Delete variables
 //..
-  delete fPhotFlag;
-  delete fPhotCkov;
-  delete fPhotPhi;
-  delete fPhotWei;
+  delete [] fPhotFlag;
+  delete [] fPhotCkov;
+  delete [] fPhotPhi;
+  delete [] fPhotWei;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Int_t index,Double_t nmean)
index a4ade2f..0185c3b 100644 (file)
@@ -634,7 +634,7 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
          for (Int_t j=0; j<kRow; j++) delete [] precpvADC[i][j];
        }
       for (Int_t i=0; i<iSMN; i++) delete [] precpvADC[i];
-      delete precpvADC;
+      delete [] precpvADC;
 
     } // DDL Loop