Skip to content

Commit 431b1d4

Browse files
committed
[LLVM Analysis] Fix potential memory leak in ApvAnalysisFactory::constructAuxiliaryApvClasses
1 parent 71e61ee commit 431b1d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CalibTracker/SiStripAPVAnalysis/src/ApvAnalysisFactory.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ void ApvAnalysisFactory::constructAuxiliaryApvClasses(ApvAnalysis* theAPV, uint3
118118
theCM = new MedianCommonModeCalculator();
119119
} else {
120120
cout << "Sorry Only Median is available for now, Mean and FastLinear are coming soon" << endl;
121+
delete theCommonMode;
121122
return;
122123
}
123124
} else {
124125
cout << "ApvAnalysisFactory: algorithm " << theAlgorithmType_ << " not supported" << endl;
126+
delete theCommonMode;
125127
return;
126128
}
127129

0 commit comments

Comments
 (0)