Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2011 15:22:12 +0000 (15:22 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2011 15:22:12 +0000 (15:22 +0000)
PWG2/FEMTOSCOPY/AliFemto/AliFemtoParticle.cxx

index 6479808..57d4832 100644 (file)
@@ -358,12 +358,16 @@ AliFemtoParticle& AliFemtoParticle::operator=(const AliFemtoParticle& aParticle)
   if (this == &aParticle)
     return *this;
 
+  if (fTrack) delete fTrack;
   if (aParticle.fTrack)
     fTrack = new AliFemtoTrack(*aParticle.fTrack);
+  if (fV0) delete fV0;
   if (aParticle.fV0)
     fV0    = new AliFemtoV0(*aParticle.fV0);
+  if (fKink) delete fKink;
   if (aParticle.fKink)
     fKink  = new AliFemtoKink(*aParticle.fKink);
+  if (fXi) delete fXi;
   if (aParticle.fXi)
     fXi    = new AliFemtoXi(*aParticle.fXi);
   fFourMomentum = aParticle.fFourMomentum;
@@ -401,6 +405,7 @@ AliFemtoParticle& AliFemtoParticle::operator=(const AliFemtoParticle& aParticle)
   fPrimaryVertex = aParticle.fPrimaryVertex;
   fSecondaryVertex = aParticle.fSecondaryVertex;
   CalculatePurity();
+  if (fHiddenInfo) delete fHiddenInfo;
   if(aParticle.fHiddenInfo){
     fHiddenInfo= aParticle.fHiddenInfo->Clone();
   }