Skip to content

Commit 8756400

Browse files
author
Tomas Dado
committed
Fixing memory leak in RooAbsCollection::find
1 parent 061b5eb commit 8756400

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

roofit/roofitcore/src/RooAbsCollection.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,8 @@ RooAbsArg * RooAbsCollection::find(const RooAbsArg& arg) const
951951

952952
if (_hashAssistedFind || _list.size() >= _sizeThresholdForMapSearch) {
953953
if (!_hashAssistedFind || !_hashAssistedFind->isValid()) {
954+
if (_hashAssistedFind)
955+
delete _hashAssistedFind;
954956
_hashAssistedFind = new HashAssistedFind{_list.begin(), _list.end()};
955957
}
956958

0 commit comments

Comments
 (0)