Fix Coverity leaks
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 18:50:15 +0000 (18:50 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Mar 2011 18:50:15 +0000 (18:50 +0000)
TTherminator/Therminator/Parser.cxx

index ff00ba3..35f9d9b 100644 (file)
@@ -455,6 +455,12 @@ void Parser::ReadInput()
          //      }
          (mDB->GetParticleType(tFather))->AddDecayChannel(*newChannel);
 
+         delete [] tFather;
+         delete [] tDaughter1;
+         delete [] tDaughter2;
+         delete [] tDaughter3;
+         delete [] tBRatio;
+
          delete newChannel;
        }
       
@@ -515,11 +521,11 @@ void Parser::ReadInput()
          //          < mDB->GetParticleType(tFather)->GetMass())
          (mDB->GetParticleType(tFather))->AddDecayChannel(*newChannel);
 
-         delete tFather;
-         delete tDaughter1;
-         delete tDaughter2;
-         delete tDaughter3;
-         delete tBRatio;
+         delete [] tFather;
+         delete [] tDaughter1;
+         delete [] tDaughter2;
+         delete [] tDaughter3;
+         delete [] tBRatio;
        }
     }