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:
		
							parent
							
								
									08f4a0f7ee
								
							
						
					
					
						commit
						7bd43ec2dd
					
				| @ -51,6 +51,7 @@ socreate(Slirp *slirp) | ||||
|     so->so_state = SS_NOFDREF; | ||||
|     so->s = -1; | ||||
|     so->slirp = slirp; | ||||
|     so->pollfds_idx = -1; | ||||
|   } | ||||
|   return(so); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jan Kiszka
						Jan Kiszka