]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/TcpDxe/SockInterface.c
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option...
[mirror_edk2.git] / NetworkPkg / TcpDxe / SockInterface.c
index e36c0e97c8049d6f5a2a44700d7c1973ffc22ff9..075e9ada6afe200b9b5d3b25918205a4562d7f22 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Interface function of the Socket.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -129,7 +129,7 @@ SockBufferToken (
 }\r
 \r
 /**\r
-  Destory the socket Sock and its associated protocol control block.\r
+  Destroy the socket Sock and its associated protocol control block.\r
 \r
   @param[in, out]  Sock                 The socket to be destroyed.\r
 \r
@@ -245,6 +245,7 @@ SockCreateChild (
   // with a new protocol control block\r
   //\r
   Status = Sock->ProtoHandler (Sock, SOCK_ATTACH, NULL);\r
+  EfiReleaseLock (&(Sock->Lock));\r
   if (EFI_ERROR (Status)) {\r
 \r
     DEBUG (\r
@@ -257,7 +258,6 @@ SockCreateChild (
     Sock = NULL;\r
   }\r
 \r
-  EfiReleaseLock (&(Sock->Lock));\r
   return Sock;\r
 }\r
 \r