]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing memory leaks (Philippe)
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 31 Aug 2007 14:05:20 +0000 (14:05 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 31 Aug 2007 14:05:20 +0000 (14:05 +0000)
MUON/AliMUONTrackReconstructor.cxx
MUON/AliMUONVTrackReconstructor.cxx

index 8fdbbea92c40c21224ad43a64587b035a89d5a2e..17f826e6e7eb11db90e3c6be83b004081098d0ec 100644 (file)
@@ -484,7 +484,10 @@ Bool_t AliMUONTrackReconstructor::FollowTrackInStation(AliMUONTrack &trackCandid
         if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->RecursiveDump();
       }
       
-    } else return kFALSE;
+    } else {
+      delete [] hitForRecCh1Used;
+      return kFALSE;
+    }
     
   } else if (foundOneHit || foundTwoHits) {
     
@@ -492,8 +495,12 @@ Bool_t AliMUONTrackReconstructor::FollowTrackInStation(AliMUONTrack &trackCandid
     fRecTracksPtr->Remove(&trackCandidate);
     fNRecTracks--;
     
-  } else return kFALSE;
+  } else {
+    delete [] hitForRecCh1Used;
+    return kFALSE;
+  }
   
+  delete [] hitForRecCh1Used;
   return kTRUE;
   
 }
index 150d9924766b187d11220a234633e1ca97a505ac..067b75922ca2e9759d3d8379612d836f567e340f 100644 (file)
@@ -788,7 +788,10 @@ Bool_t AliMUONVTrackReconstructor::FollowLinearTrackInStation(AliMUONTrack &trac
         if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->RecursiveDump();
       }
       
-    } else return kFALSE;
+    } else {
+      delete [] hitForRecCh1Used;
+      return kFALSE;
+    }
     
   } else if (foundOneHit || foundTwoHits) {
     
@@ -796,8 +799,12 @@ Bool_t AliMUONVTrackReconstructor::FollowLinearTrackInStation(AliMUONTrack &trac
     fRecTracksPtr->Remove(&trackCandidate);
     fNRecTracks--;
     
-  } else return kFALSE;
+  } else {
+    delete [] hitForRecCh1Used;  
+    return kFALSE;
+  }
   
+  delete [] hitForRecCh1Used;
   return kTRUE;
   
 }