Skip to content

Commit 452ec09

Browse files
committed
libstore: Fix use-after-move in DerivationGoal::repairClosure
1 parent 7ba3ef2 commit 452ec09

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/libstore/build/derivation-goal.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,10 @@ Goal::Co DerivationGoal::repairClosure()
378378
bmRepair));
379379
}
380380

381+
bool haveWaitees = !waitees.empty();
381382
co_await await(std::move(waitees));
382383

383-
if (!waitees.empty()) {
384+
if (haveWaitees) {
384385
trace("closure repaired");
385386
if (nrFailed > 0)
386387
throw Error(

0 commit comments

Comments
 (0)