aboutsummaryrefslogtreecommitdiff
path: root/slirp/socket.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2013-02-22 20:47:10 +0100
committerJan Kiszka <jan.kiszka@siemens.com>2013-02-26 12:10:21 +0100
commit7bd43ec2dd3ffaa12e6331af41fc55d4b2b12f13 (patch)
tree952bbdb8a816037561ba3cae42f658b37330e770 /slirp/socket.c
parent08f4a0f7ee899c32bac91114e859d2687cbcf1d7 (diff)
downloadqemu-7bd43ec2dd3ffaa12e6331af41fc55d4b2b12f13.zip
qemu-7bd43ec2dd3ffaa12e6331af41fc55d4b2b12f13.tar.gz
qemu-7bd43ec2dd3ffaa12e6331af41fc55d4b2b12f13.tar.bz2
slirp: Properly initialize pollfds_idx of new sockets
Otherwise we may start processing sockets in slirp_pollfds_poll that were created past slirp_pollfds_fill. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'slirp/socket.c')
-rw-r--r--slirp/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index a7ab933..bb639ae 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -51,6 +51,7 @@ socreate(Slirp *slirp)
so->so_state = SS_NOFDREF;
so->s = -1;
so->slirp = slirp;
+ so->pollfds_idx = -1;
}
return(so);
}