[libvirt] [PATCH 27/38] qemu: hotplug: Allow passing in NULL 'tlsAlias' to qemuDomainGetTLSObjects

Peter Krempa pkrempa at redhat.com
Wed May 30 12:41:23 UTC 2018


Some callers will not need to generate the alias again.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_hotplug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 8cfb81d545..f52e0c773d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1523,7 +1523,8 @@ qemuDomainGetTLSObjects(virQEMUCapsPtr qemuCaps,
                                      tlsProps) < 0)
         return -1;

-    if (!(*tlsAlias = qemuAliasTLSObjFromSrcAlias(srcAlias)))
+    if (tlsAlias &&
+        !(*tlsAlias = qemuAliasTLSObjFromSrcAlias(srcAlias)))
         return -1;

     return 0;
-- 
2.16.2




More information about the libvir-list mailing list