Close the socket if bind() fails (#36769)
Close the socket if bind() fails (#36769)

When using a socket with bind() and bind fails, close the socket to free
up the resources associated with the socket.
wtgodbe/corefx,shimingsg/corefx,ericstj/corefx,ericstj/corefx,shimingsg/corefx,ViktorHofer/corefx,ericstj/corefx,ericstj/corefx,BrennanConroy/corefx,ericstj/corefx,ViktorHofer/corefx,wtgodbe/corefx,shimingsg/corefx,shimingsg/corefx,ViktorHofer/corefx,ViktorHofer/corefx,wtgodbe/corefx,wtgodbe/corefx,BrennanConroy/corefx,wtgodbe/corefx,shimingsg/corefx,ViktorHofer/corefx,wtgodbe/corefx,ericstj/corefx,wtgodbe/corefx,ericstj/corefx,BrennanConroy/corefx,ViktorHofer/corefx,ViktorHofer/corefx,shimingsg/corefx,shimingsg/corefx