Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/qemu/qemu_hotplug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index fdede5d..b209b04 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2643,7 +2643,7 @@ qemuDomainRemoveNetDevice(virQEMUDriverPtr driver, if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_HOSTDEV) { /* this function handles all hostdev and netdev cleanup */ qemuDomainRemoveHostDevice(driver, vm, virDomainNetGetActualHostdev(net)); - return; + goto cleanup; } VIR_DEBUG("Removing network interface %s from domain %p %s", @@ -2689,6 +2689,8 @@ qemuDomainRemoveNetDevice(virQEMUDriverPtr driver, networkReleaseActualDevice(vm->def, net); virDomainNetDefFree(net); + + cleanup: virObjectUnref(cfg); } -- 1.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list