mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
6306f88df0
commit
3aca4865a8
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user