Skip to content

Memory leak in RapidExternalEvtGen::decay for Bs mixing #68

Description

@lorenzopaolucci

In lines 61-63 in RapidExternalEvtGen.cc

while(theParticle->getNDaug()==1) {
theParticle = theParticle->getDaug(0);
}

the pointer gets overwritten with the final state of the meson, without however making sure the first state is properly deleted, thus creating a memory leak. Suggest to update the while loop to:

while(theParticle->getNDaug()==1) {
EvtParticle* originalState = theParticle;
theParticle = theParticle->getDaug(0);
delete originalState;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions