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>
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);
}
}
}