]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity fixes 19592, 19591, 19587, 19586, 19582
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 25 Feb 2012 07:49:50 +0000 (07:49 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 25 Feb 2012 07:49:50 +0000 (07:49 +0000)
PHOS/AliPHOSDATreeCluster.cxx
PHOS/AliPHOSRecPoint.cxx

index 51040cdd6c911657b7c8271a8b62fc725485e396..4acf8b27f3abe9c7742f1129b71294e3840df730 100644 (file)
@@ -165,7 +165,7 @@ bool AliPHOSDATreeCluster::Append(AliPHOSDATreeCluster& cluster){
       newfDigits[ndigitsall]= cluster.fDigits[--ndigits2];
     } else {
       std::cout<<" AliPHOSDATreeCluster::Append() Something wrong.. "<<std::endl;
-      delete newfDigits;
+      delete [] newfDigits;
       return false;
     }
   }
index e34210e090dcd28d7d61a45783a4cc2ac7b36999..9622d1cb6b44dfad6cfa4e0d6f544b9258a54547 100644 (file)
@@ -107,14 +107,18 @@ AliPHOSRecPoint& AliPHOSRecPoint::operator= (const AliPHOSRecPoint &rp)
   fLocPos = rp.fLocPos;
 
   if (fDigitsList != 0) delete [] fDigitsList;
-  if (rp.fMulDigit>0) fDigitsList = new Int_t[rp.fMulDigit];
-  for(Int_t i=0; i<fMaxDigit; i++)
-    fDigitsList[i] = rp.fDigitsList[i];
+  if (fMaxDigit>0) {
+    fDigitsList = new Int_t[fMaxDigit];
+    for(Int_t i=0; i<fMaxDigit; i++)
+      fDigitsList[i] = rp.fDigitsList[i];
+  }
 
   if (fTracksList != 0) delete [] fTracksList;
-  if (rp.fMulTrack>0) fTracksList = new Int_t[rp.fMulTrack];
-  for(Int_t i=0; i<fMaxTrack; i++)
-    fTracksList[i] = rp.fTracksList[i];
+  if (fMaxTrack>0) {
+    fTracksList = new Int_t[fMaxTrack];
+    for(Int_t i=0; i<fMaxTrack; i++)
+      fTracksList[i] = rp.fTracksList[i];
+  }
 
   return *this;
 }