]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix Coverity reports
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Feb 2011 09:35:18 +0000 (09:35 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Feb 2011 09:35:18 +0000 (09:35 +0000)
TTherminator/TTherminator.cxx
TTherminator/Therminator/Event.cxx
TTherminator/Therminator/Parser.cxx

index 4bb17d678d33c4fd90a179307022a10fcc423804..6fb0d961faf67f4e214ce528e0b783cd079ac8f7 100644 (file)
@@ -204,6 +204,8 @@ void        TTherminator::Initialize(){
        }
       in.close();
     }
+
+  delete tParser;
 }
 
 void        TTherminator::GenerateEvent()
index 0949c42bb323984d30ef276ab0ab3d930eb3a282..56b673e3aaf3d85e81fda1b907dba871b43415fb 100644 (file)
@@ -268,12 +268,13 @@ Event::ReadMultiplicities()
     while (!fin->eof())
     {
       (*fin) >> tName >> tMult;
-      PRINT_DEBUG_2(tName << " " <<  mDB->GetParticleTypeIndex(strdup(tName)) << " " << tMult);
+      PRINT_DEBUG_2(tName << " " <<  mDB->GetParticleTypeIndex(tName) << " " << tMult);
       mAverageMultiplicities[mDB->GetParticleTypeIndex(strdup(tName))] = tMult;
     }
     fin->close();
   }
 
+  delete tHash;
   delete tMultName;
 }
 
index 8a3686372f72ef1da96cf44d551de6f17f3e537f..72de7e385b00efe4a69a4fb6e45f59145cc49521 100644 (file)
@@ -111,8 +111,8 @@ int Parser::GetParticleNumber(int i)
 void Parser::ReadInput()
 {
   int j,tPartIter=0,l,tIter2, tIter; //variables
-  char str[50];
-  char str1[20];
+  char str[200];
+  char str1[200];
   double spin1,spin2,value;
 
   //////  START OF "TABLES.M" /////////
@@ -342,6 +342,11 @@ void Parser::ReadInput()
            tRatio *= atof(tBRatio)/atof(tBRatio+2);
          else
            tRatio *= atof(tBRatio);
+
+         delete tFather;
+         delete tDaughter1;
+         delete tDaughter2;
+         delete tBRatio;
        }
 
       //THREE-BODY DECAYS
@@ -449,6 +454,8 @@ void Parser::ReadInput()
          //        (mDB->GetParticleType(tFather))->AddDecayChannel(*newChannel);
          //      }
          (mDB->GetParticleType(tFather))->AddDecayChannel(*newChannel);
+
+         delete newChannel;
        }
       
       if(str[0] == 's' && str[1] == 'e' && str[2] == '3')
@@ -637,6 +644,8 @@ void Parser::ReadShare()
                    mDB->GetParticleType(tDaughter3)->GetMass()
                    < mDB->GetParticleType(tFather)->GetMass())
                  (mDB->GetParticleType(tFather))->AddDecayChannel(*newChannel);
+
+               delete newChannel;
                
                tRatio=tBRatio;
                PRINT_DEBUG_2(tBRatio << '\t' << tRatio);