if(str[0] == 's' && str[1] == 'e' && str[2] == '[')
{
// Reading in the decay channels
- char *tLBrackert, *tFirstComma, *tSecondComma, *tThirdComma, *tRBracket;
+ char *tLBrackert=NULL, *tFirstComma=NULL, *tSecondComma=NULL, *tThirdComma=NULL, *tRBracket=NULL;
tLBrackert = strchr(str,'[');
tFirstComma = strchr(str,',');
tThirdComma = strchr(tSecondComma+1,',');
tRBracket = strchr(tThirdComma,']');
- if (!(tLBrackert && tFirstComma && tSecondComma && tThirdComma && tRBracket))
+ if (!((tLBrackert != NULL) && (tFirstComma != NULL) && (tSecondComma != NULL) && ( tThirdComma != NULL) && (tRBracket!= NULL)))
PRINT_DEBUG_1("Malformed line!: " << str);
char *tFather = new char[tFirstComma-tLBrackert];
delete [] tDaughter2;
delete [] tDaughter3;
delete [] tBRatio;
+
+ delete newChannel;
}
}
tPartBuf->SetPDGCode((int) mc);
tPartBuf->SetNumber(number);
tNum = mDB->AddParticleType(tPartBuf);
+
+ delete tPartBuf;
}
in.close();
}
{
(mDB->GetParticleType(tFather))->AddDecayChannel(*newChannel);
PRINT_DEBUG_2("Added channel " << newChannel << " " << mDB->GetParticleTypeIndex(tFather) << " " << mDB->GetParticleTypeIndex(tDaughter1) << " " << mDB->GetParticleTypeIndex(tDaughter2));
+ delete newChannel;
}
else
{