Otherwise we may start processing sockets in slirp_pollfds_poll that were created past slirp_pollfds_fill.
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- Not sure if this pattern also applies to other users besides slirp. Worth checking I suppose. slirp/socket.c | 1 + 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); } -- 1.7.3.4