[libvirt PATCH 2/8] libxl: xenParseXMOS: separate VIR_ALLOC call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To reduce churn in the following patches.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/libxl/xen_xm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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)
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux