summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/tap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tap.c b/net/tap.c
index a327a9a6bf..0d8b424123 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -378,7 +378,7 @@ static int net_tap_init(QemuOpts *opts, int *vnet_hdr)
int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
{
TAPState *s;
- int fd, vnet_hdr;
+ int fd, vnet_hdr = 0;
if (qemu_opt_get(opts, "fd")) {
if (qemu_opt_get(opts, "ifname") ||