forked from lix-project/hydra
queue runner: fix nullptr deref on build exception after releasing a machine reservation
This commit is contained in:
parent
05d620a54f
commit
fb9e29d4d0
|
@ -37,11 +37,12 @@ void State::builder(MachineReservation::ptr reservation)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto destStore = getDestStore();
|
auto destStore = getDestStore();
|
||||||
|
// Might release the reservation.
|
||||||
res = doBuildStep(destStore, reservation, activeStep);
|
res = doBuildStep(destStore, reservation, activeStep);
|
||||||
} catch (std::exception & e) {
|
} catch (std::exception & e) {
|
||||||
printMsg(lvlError, "uncaught exception building ‘%s’ on ‘%s’: %s",
|
printMsg(lvlError, "uncaught exception building ‘%s’ on ‘%s’: %s",
|
||||||
localStore->printStorePath(reservation->step->drvPath),
|
localStore->printStorePath(activeStep->step->drvPath),
|
||||||
reservation->machine->sshName,
|
reservation ? reservation->machine->sshName : std::string("(no machine)"),
|
||||||
e.what());
|
e.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue