From 49dd390d29d72a07ff3de41a4228392ff6131c16 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 30 Oct 2025 15:25:07 -0700 Subject: [PATCH] leak Signed-off-by: James Cherry --- search/PathGroup.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/search/PathGroup.cc b/search/PathGroup.cc index 36414909..019269ff 100644 --- a/search/PathGroup.cc +++ b/search/PathGroup.cc @@ -642,15 +642,14 @@ MakePathEnds1::visitPathEnd(PathEnd *path_end, if (group->saveable(path_end)) { // Only keep the path end with the smallest slack/latest arrival. PathEnd *worst_end = ends_.findKey(group); - PathEnd *copy = path_end->copy(); if (worst_end) { if (cmp_(path_end, worst_end)) { - ends_[group] = copy; + ends_[group] = path_end->copy(); delete worst_end; } } else - ends_[group] = copy; + ends_[group] = path_end->copy(); } }