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>
This commit is contained in:
Jan Kiszka 2013-02-22 20:47:10 +01:00
parent 08f4a0f7ee
commit 7bd43ec2dd

View File

@ -51,6 +51,7 @@ socreate(Slirp *slirp)
so->so_state = SS_NOFDREF;
so->s = -1;
so->slirp = slirp;
so->pollfds_idx = -1;
}
return(so);
}