WS_EnterSingleProtocol[A/W]() fills WSAPROTOCOL_INFO with zeroes, ovewriting what was already there, so in ws_protocol_info(), populate the address family, socket type and protocol only AFTER calling it.
This bug was found through Python's test suite, in particular its test.test_socket.TestSocketSharing unit test.
Signed-off-by: Damjan Jovanovic damjan.jov@gmail.com --- dlls/ws2_32/socket.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)