mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: fix cleanup bug in initiate_domain_create()
In case of errors, we immediately call domcreate_complete() which cleans up the console_xswait object. Make sure it is initialized before we start cleanup. Signed-off-by: Paweł Marczewski <pawel@invisiblethingslab.com> Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
76416c459c
commit
d094e95fb7
1 file changed
+2
-2
@@ -1168,6 +1168,8 @@ static void initiate_domain_create(libxl__egc *egc,
|
||||
libxl_domain_config *const d_config = dcs->guest_config;
|
||||
const int restore_fd = dcs->restore_fd;
|
||||
|
||||
libxl__xswait_init(&dcs->console_xswait);
|
||||
|
||||
domid = dcs->domid;
|
||||
libxl__domain_build_state_init(&dcs->build_state);
|
||||
|
||||
@@ -1219,8 +1221,6 @@ static void initiate_domain_create(libxl__egc *egc,
|
||||
if (ret)
|
||||
goto error_out;
|
||||
|
||||
libxl__xswait_init(&dcs->console_xswait);
|
||||
|
||||
if (restore_fd >= 0 || dcs->soft_reset) {
|
||||
LOGD(DEBUG, domid, "restoring, not running bootloader");
|
||||
domcreate_bootloader_done(egc, &dcs->bl, 0);
|
||||
|
||||