Skip to content

Fix a memory leak in Evaluator

Clang address sanitizer pointed out that the string new[]d in Evaluator::evaluate is never being delete[]d.

Direct leak of 6 byte(s) in 1 object(s) allocated from:
    #0 0x370a98 in operator new[](unsigned long) (/var/jenkins/workspace/Celeritas_PR-581/build/app/demo-loop+0x370a98)
    #1 0x7f0f0566d480 in HepTool::Evaluator::evaluate(char const*) (/opt/software/linux-centos7-x86_64/gcc-7.3.1/clhep-2.4.6.0-7kz2najh4o6e5nbrji7wlqj4dlo2nrxy/lib/libCLHEP-2.4.6.0.so+0x9a480) (BuildId: fff244e49a1c11bbf94b7a3e8fd52b875186285c)

Merge request reports

Loading