From 7bd43ec2dd3ffaa12e6331af41fc55d4b2b12f13 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 22 Feb 2013 20:47:10 +0100 Subject: [PATCH] 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 Reviewed-by: Stefan Hajnoczi --- slirp/socket.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.7.4