]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing problem with potential memory leak.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jan 2011 14:00:51 +0000 (14:00 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jan 2011 14:00:51 +0000 (14:00 +0000)
HLT/MUON/utils/dHLTrootify.cxx

index 19b715bf6defc1e3a50780d50f878a0325414ac0..bcaf8d13cc35e4112ec67ceb65d049c1d1a6d230 100644 (file)
@@ -166,9 +166,10 @@ int RootifyFiles(
        AliHLTConfiguration sink("sink", "ROOTFileWriter", "convert", params.Data());
        
        // Build and run the HLT tasks.
-       if (sys.BuildTaskList("sink") != 0) return HLTSYSTEM_ERROR;
-       if (maxLogging) sys.PrintTaskList();
-       if (sys.Run() != 0) return HLTSYSTEM_ERROR;
+       int resultcode = EXIT_SUCCESS;
+       if (sys.BuildTaskList("sink") != 0) resultcode = HLTSYSTEM_ERROR;
+       if (resultcode == EXIT_SUCCESS and maxLogging) sys.PrintTaskList();
+       if (resultcode == EXIT_SUCCESS and sys.Run() != 0) resultcode = HLTSYSTEM_ERROR;
        
        // Clean up all the dynamically allocate objects.
        for (int i = 0; i < numOfFiles; i++)
@@ -177,7 +178,7 @@ int RootifyFiles(
        }
        delete [] filePubs;
 
-       return EXIT_SUCCESS;
+       return resultcode;
 }
 
 /**