render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
982648
From c96a89bd5962a945f6097af4fa7264446cba613f Mon Sep 17 00:00:00 2001
982648
Message-Id: <c96a89bd5962a945f6097af4fa7264446cba613f@dist-git>
982648
From: Peter Krempa <pkrempa@redhat.com>
982648
Date: Tue, 10 Jul 2018 17:41:10 +0200
982648
Subject: [PATCH] qemu: hotplug: Do not try to add secret object for TLS if it
982648
 does not exist
982648
MIME-Version: 1.0
982648
Content-Type: text/plain; charset=UTF-8
982648
Content-Transfer-Encoding: 8bit
982648
982648
The check whether the object holding secret for decryption of the TLS
982648
environment was wrong and would always attempt to add the object. This
982648
lead to a crash due to recent refactors.
982648
982648
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1598015
982648
982648
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
982648
Reviewed-by: Ján Tomko <jtomko@redhat.com>
982648
(cherry picked from commit 62ef8227e2717618c96fa17f2d4f5b7570bbe980)
982648
Reviewed-by: Ján Tomko <jtomko@redhat.com>
982648
---
982648
 src/qemu/qemu_hotplug.c | 2 +-
982648
 1 file changed, 1 insertion(+), 1 deletion(-)
982648
982648
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
982648
index 075f2fb72e..456bfa4493 100644
982648
--- a/src/qemu/qemu_hotplug.c
982648
+++ b/src/qemu/qemu_hotplug.c
982648
@@ -1338,7 +1338,7 @@ qemuDomainAddTLSObjects(virQEMUDriverPtr driver,
982648
     if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
982648
         return -1;
982648
 
982648
-    if (secProps &&
982648
+    if (secProps && *secProps &&
982648
         qemuMonitorAddObject(priv->mon, secProps, &secAlias) < 0)
982648
         goto error;
982648
 
982648
-- 
982648
2.18.0
982648