Memory leak corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Jul 2005 09:14:56 +0000 (09:14 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Jul 2005 09:14:56 +0000 (09:14 +0000)
PYTHIA6/AliGenPythia.cxx

index f505b7e..eff351b 100644 (file)
@@ -693,7 +693,10 @@ Int_t  AliGenPythia::GenerateMB()
     if (fProcess == kPyJets || fProcess == kPyDirectGamma) {
        TParticle* jet1 = (TParticle *) fParticles->At(6);
        TParticle* jet2 = (TParticle *) fParticles->At(7);
-       if (!CheckTrigger(jet1, jet2)) return 0;
+       if (!CheckTrigger(jet1, jet2)) {
+           delete pParent;
+           return 0;
+       }
     }
     
     for (i = 0; i < np; i++) {