提交 25a5df16 编写于 作者: J Jiri Denemark

qemu: Unref cfg when detaching hostdev interface

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 47f424c2
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册