diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-02-22 20:47:10 +0100 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2013-02-26 12:10:21 +0100 |
commit | 7bd43ec2dd3ffaa12e6331af41fc55d4b2b12f13 (patch) | |
tree | 952bbdb8a816037561ba3cae42f658b37330e770 /slirp | |
parent | 08f4a0f7ee899c32bac91114e859d2687cbcf1d7 (diff) |
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')
-rw-r--r-- | slirp/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/slirp/socket.c b/slirp/socket.c index a7ab933c43..bb639aed9c 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); } |