提交 929fe497 编写于 作者: J Juergen Lock 提交者: Blue Swirl

Avoid segfault on net_tap_init() failure

Check for fd == -1 there.
Signed-off-by: NJuergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 2f859a3c
......@@ -399,6 +399,9 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
}
fd = net_tap_init(opts, &vnet_hdr);
if (fd == -1) {
return -1;
}
}
s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册