提交 334c539b 编写于 作者: R Roopa Prabhu 提交者: Eric Blake

qemu: don't release network actual device twice

For direct attach devices, in qemuBuildCommandLine, we seem to be freeing
actual device on error path (with networkReleaseActualDevice). But the actual
device is not deleted.

qemuProcessStop eventually deletes the direct attach device and releases
actual device. But by the time qemuProcessStop is called qemuBuildCommandLine
has already freed actual device, leaving stray macvtap devices behind on error.
So the simplest fix is to remove the networkReleaseActualDevice in
qemuBuildCommandLine. This patch does just that.
Signed-off-by: NRoopa Prabhu <roprabhu@cisco.com>
上级 2e37bf42
......@@ -5432,8 +5432,6 @@ qemuBuildCommandLine(virConnectPtr conn,
virReportOOMError();
error:
/* free up any resources in the network driver */
for (i = 0 ; i < def->nnets ; i++)
networkReleaseActualDevice(def->nets[i]);
for (i = 0; i <= last_good_net; i++)
virDomainConfNWFilterTeardown(def->nets[i]);
virCommandFree(cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册