OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f859a3
)
Avoid segfault on net_tap_init() failure
author
Juergen Lock
<nox@jelal.kn-bremen.de>
Fri, 20 Nov 2009 22:23:03 +0000
(23:23 +0100)
committer
Blue Swirl
<blauwirbel@gmail.com>
Sat, 21 Nov 2009 09:32:15 +0000
(09:32 +0000)
Check for fd == -1 there.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
net/tap.c
patch
|
blob
|
history
diff --git
a/net/tap.c
b/net/tap.c
index
69c905c
..
b2e5908
100644
(file)
--- a/
net/tap.c
+++ b/
net/tap.c
@@
-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);