From: Ian Jackson Date: Mon, 23 Jul 2012 12:09:36 +0000 (+0100) Subject: libxl: do not blunder on if bootloader fails X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8179 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=267cda5f2e4d19b85acfc94d4bfeffb80cf1ea0f;p=xen.git libxl: do not blunder on if bootloader fails If the bootloader failed, we would call the creation failure callback but _also_ blunder on trying to recreate the domain, due to a missing "return". Signed-off-by: Ian Jackson Reported-by: Roger Pau Monne Acked-by: Ian Campbell Committed-by: Ian Campbell --- diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 294a73fe57..0bfa8babee 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -672,7 +672,10 @@ static void domcreate_bootloader_done(libxl__egc *egc, libxl__srm_restore_autogen_callbacks *const callbacks = &dcs->shs.callbacks.restore.a; - if (rc) domcreate_rebuild_done(egc, dcs, rc); + if (rc) { + domcreate_rebuild_done(egc, dcs, rc); + return; + } /* consume bootloader outputs. state->pv_{kernel,ramdisk} have * been initialised by the bootloader already.