]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / SockInterface.c
index daf788aab679cf40a6512c1f5ca0cbd85d96b2c3..ac36460da8d5a7f8fb427f4c7bd30ebca8ad03a1 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Interface function of the Socket.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php<BR>\r
@@ -131,7 +131,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  Sock                 The socket to be destroyed.\r
 \r
@@ -237,6 +237,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 ((EFI_D_ERROR, "SockCreateChild: Protocol failed to"\r
@@ -246,7 +247,6 @@ SockCreateChild (
     Sock = NULL;\r
   }\r
 \r
-  EfiReleaseLock (&(Sock->Lock));\r
   return Sock;\r
 }\r
 \r