From: Wei Liu Date: Thu, 3 Nov 2016 16:41:56 +0000 (+0000) Subject: libxl: set ret in the check for nestedhvm and altp2m X-Git-Tag: 4.8.0-rc6~20 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7cae6b6eb743f21b5b002ab2d2954271c759ee14;p=xen.git libxl: set ret in the check for nestedhvm and altp2m The error path expects ret to be set, otherwise an assertion is triggered. Signed-off-by: Wei Liu Acked-by: Ian Jackson Release-acked-by: Wei Liu --- diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index d986cd277b..abd2272e1b 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -910,6 +910,7 @@ static void initiate_domain_create(libxl__egc *egc, if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM && (libxl_defbool_val(d_config->b_info.u.hvm.nested_hvm) && libxl_defbool_val(d_config->b_info.u.hvm.altp2m))) { + ret = ERROR_INVAL; LOG(ERROR, "nestedhvm and altp2mhvm cannot be used together"); goto error_out; }