qemuDomainSecretHostdevDestroy: Don't clear secinfo alias

We need the alias to deal with hot-unplug of the hostdev. Use
qemuDomainSecretInfoDestroy which clears only the secrets and not the
alias. The same function is used also for handling disk secrets.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-07-10 14:54:09 +02:00
parent 6306f88df0
commit 3aca4865a8

View File

@ -1221,8 +1221,8 @@ qemuDomainSecretHostdevDestroy(virDomainHostdevDefPtr hostdev)
if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) {
srcPriv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src);
if (srcPriv && srcPriv->secinfo)
g_clear_pointer(&srcPriv->secinfo, qemuDomainSecretInfoFree);
if (srcPriv)
qemuDomainSecretInfoDestroy(srcPriv->secinfo);
}
}
}