- NewSocketFd = BslSocketProtocolToFd ( pNewSocket, &errno );\r
- if ( -1 == NewSocketFd ) {\r
- //\r
- // Close the socket\r
- //\r
- BslSocketCloseWork ( pNewSocket, NULL );\r
+ if ( !EFI_ERROR ( Status )) {\r
+ NewSocketFd = BslSocketProtocolToFd ( pNewSocket, &errno );\r
+ if ( -1 == NewSocketFd ) {\r
+ //\r
+ // Close the socket\r
+ //\r
+ BslSocketCloseWork ( pNewSocket, NULL );\r
+ }\r