It's referenced only once and it's a shortcut to the chardev source thus
can be used directly.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 5e44210aff..3373ec2cdf 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2184,7 +2184,6 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver,
virDomainDef *vmdef = vm->def;
g_autoptr(virJSONValue) devprops = NULL;
g_autoptr(virJSONValue) netdevprops = NULL;
- virDomainChrSourceDef *dev = chr->source;
g_autofree char *charAlias = NULL;
bool chardevAttached = false;
bool teardowncgroup = false;
@@ -2233,7 +2232,7 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver,
if (qemuDomainChrPreInsert(vmdef, chr) < 0)
goto cleanup;
- if (qemuDomainAddChardevTLSObjects(driver, vm, dev,
+ if (qemuDomainAddChardevTLSObjects(driver, vm, chr->source,
chr->info.alias, charAlias,
&tlsAlias, &secAlias) < 0)
goto audit;
--
2.31.1