Skip to content

Commit

Permalink
slirp: Properly initialize pollfds_idx of new sockets
Browse files Browse the repository at this point in the history
Otherwise we may start processing sockets in slirp_pollfds_poll that
were created past slirp_pollfds_fill.

Signed-off-by: Jan Kiszka <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
  • Loading branch information
jan-kiszka committed Feb 26, 2013
1 parent 08f4a0f commit 7bd43ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions slirp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ socreate(Slirp *slirp)
so->so_state = SS_NOFDREF;
so->s = -1;
so->slirp = slirp;
so->pollfds_idx = -1;
}
return(so);
}
Expand Down

0 comments on commit 7bd43ec

Please sign in to comment.