From: Ján Tomko Date: Tue, 6 Oct 2020 14:45:20 +0000 (+0200) Subject: libxl: xenParseXMOS: separate VIR_ALLOC call X-Git-Tag: v6.9.0-rc1~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c93f8cb74dd61d45f2f1e9654ade86b1e0c6de8;p=thirdparty%2Flibvirt.git libxl: xenParseXMOS: separate VIR_ALLOC call To reduce churn in the following patches. Signed-off-by: Ján Tomko Reviewed-by: Pavel Hrdina --- diff --git a/src/libxl/xen_xm.c b/src/libxl/xen_xm.c index 8ade5aec1c..6d00f47544 100644 --- a/src/libxl/xen_xm.c +++ b/src/libxl/xen_xm.c @@ -42,8 +42,10 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def) if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { g_autofree char *boot = NULL; - if (VIR_ALLOC(def->os.loader) < 0 || - xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0) + if (VIR_ALLOC(def->os.loader) < 0) + return -1; + + if (xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0) return -1; if (xenConfigGetString(conf, "boot", &boot, "c") < 0)