]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update error handling code if failing attach socket with new PCB in TcpDxe module.
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Oct 2011 07:24:52 +0000 (07:24 +0000)
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Oct 2011 07:24:52 +0000 (07:24 +0000)
Signed-off-by: tye
Reviewed-by: xdu2
Reviewed-by: qouyang
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12590 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/TcpDxe/SockInterface.c

index e36c0e97c8049d6f5a2a44700d7c1973ffc22ff9..ebab8c7f187d678721dec64fc42539d9d7a5bac8 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 - 2011, 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
@@ -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