render / rpms / libvirt

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