From f25f30aff548636d0c8782d3eaee049c77548dd5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Fri, 19 May 2017 14:14:32 +0200 Subject: [PATCH] Do not release unreserved address in qemuDomainAttachRNGDevice Only set releaseaddr to true after the address has been reserved successfully. https://bugzilla.redhat.com/show_bug.cgi?id=1452581 Reviewed-by: John Ferlan --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1d7f2cc71b..e99895af68 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2090,7 +2090,6 @@ qemuDomainAttachRNGDevice(virConnectPtr conn, rng->source.file)) goto cleanup; } - releaseaddr = true; if (rng->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE || rng->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { @@ -2103,6 +2102,7 @@ qemuDomainAttachRNGDevice(virConnectPtr conn, !rng->info.addr.ccw.assigned) < 0) goto cleanup; } + releaseaddr = true; if (qemuDomainNamespaceSetupRNG(driver, vm, rng) < 0) goto cleanup; -- 2.47.2