Skip to content

Commit f787ac9

Browse files
committed
Remove a potential memory leak
1 parent c64df4c commit f787ac9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Geometry/GEMGeometryBuilder/src/GEMGeometryBuilder.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ void GEMGeometryBuilder::buildRegions(GEMGeometry& theGeometry,
608608
if (foundSuperChamber) {
609609
station->add(ring);
610610
theGeometry.add(ring);
611-
}
611+
} else
612+
delete ring;
612613
}
613614
if (!foundSuperChamber) {
614615
#ifdef EDM_ML_DEBUG

0 commit comments

Comments
 (0)