qemu: hotplug: Use 'tlsAlias' to see whether to detach the disk

Using 'haveTLS' to do this is pointless if the alias is not set.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2018-05-30 11:33:13 +02:00
parent dbb4ff0919
commit 5e8218fad7

View File

@ -3958,7 +3958,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
!virStoragePRDefIsManaged(disk->src->pr))
ignore_value(qemuMonitorDelObject(priv->mon, disk->src->pr->mgralias));
if (disk->src->haveTLS)
if (disk->src->tlsAlias)
ignore_value(qemuMonitorDelObject(priv->mon, disk->src->tlsAlias));
if (prManaged && !prUsed)