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 | 8b3706dae059856a1c6f1914f76ad35e602fa6f4 (patch) | |
tree | 94edfefc0a6aded39593d272b15020cac2df9cef /socket.c | |
parent | fc7626711be9b339157e48f29e54c64f612171cb (diff) | |
download | slirp-8b3706dae059856a1c6f1914f76ad35e602fa6f4.zip slirp-8b3706dae059856a1c6f1914f76ad35e602fa6f4.tar.gz slirp-8b3706dae059856a1c6f1914f76ad35e602fa6f4.tar.bz2 |
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 'socket.c')
-rw-r--r-- | socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -46,6 +46,7 @@ struct socket *socreate(Slirp *slirp) so->so_state = SS_NOFDREF; so->s = -1; so->slirp = slirp; + so->pollfds_idx = -1; } return (so); } |