From: Ian Jackson Date: Wed, 1 Jul 2015 14:20:03 +0000 (+0100) Subject: libxl: Do not try to destroy domain -1 on failed create X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2972 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3d55a179fac1f4463142386122eff7d254e1788d;p=xen.git libxl: Do not try to destroy domain -1 on failed create Perhaps since f0c4c53f "libxl: domain create: Do not destroy on ao abort", we have destroyed guest_domid==-1 if domain creation fails without actually creating a domid. Reported-by: Julien Grall CC: Julien Grall Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index f366a09dac..f7990811e7 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1543,7 +1543,7 @@ static void domcreate_complete(libxl__egc *egc, libxl_domain_config_dispose(d_config_saved); if (!retain_domain) { - if (dcs->guest_domid) { + if (dcs->guest_domid > 0) { dcs->dds.ao = ao; dcs->dds.domid = dcs->guest_domid; dcs->dds.callback = domcreate_destruction_cb;