Fix for bug #74180: Commit and port changes to the release - AliFileMerger
[u/mrichter/AliRoot.git] / ANALYSIS / AliFileMerger.cxx
index 8d05509..11b76b6 100644 (file)
@@ -118,6 +118,8 @@ void AliFileMerger::IterAlien(const char* outputDir, const char* outputFileName,
     TFile* currentFile=TFile::Open((objs->GetString()).Data());
     if(!currentFile) continue; // protection
     Merge(currentFile, mergeArray);
+
+    if(currentFile) delete currentFile;
   }
   Bool_t separate = kFALSE;
   if (separate) {
@@ -128,6 +130,7 @@ void AliFileMerger::IterAlien(const char* outputDir, const char* outputFileName,
   }
   delete mergeArray;
   delete res;
+
 }