Skip to content

Commit 49dd390

Browse files
committed
leak
Signed-off-by: James Cherry <[email protected]>
1 parent 98d801d commit 49dd390

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

search/PathGroup.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,15 +642,14 @@ MakePathEnds1::visitPathEnd(PathEnd *path_end,
642642
if (group->saveable(path_end)) {
643643
// Only keep the path end with the smallest slack/latest arrival.
644644
PathEnd *worst_end = ends_.findKey(group);
645-
PathEnd *copy = path_end->copy();
646645
if (worst_end) {
647646
if (cmp_(path_end, worst_end)) {
648-
ends_[group] = copy;
647+
ends_[group] = path_end->copy();
649648
delete worst_end;
650649
}
651650
}
652651
else
653-
ends_[group] = copy;
652+
ends_[group] = path_end->copy();
654653
}
655654
}
656655

0 commit comments

Comments
 (0)