mirror of
https://github.com/xemu-project/xemu.git
synced 2026-11-13 17:49:00 +01:00
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:
1 parent
08f4a0f7ee
commit
7bd43ec2dd
1 file changed
+1
@@ -51,6 +51,7 @@ socreate(Slirp *slirp)
|
||||
so->so_state = SS_NOFDREF;
|
||||
so->s = -1;
|
||||
so->slirp = slirp;
|
||||
so->pollfds_idx = -1;
|
||||
}
|
||||
return(so);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user