From 80ae1cc7004d6667850d829adc4dc7708816a5a6 Mon Sep 17 00:00:00 2001 From: tye1 Date: Fri, 28 Oct 2011 07:24:52 +0000 Subject: [PATCH] Update error handling code if failing attach socket with new PCB in TcpDxe module. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NetworkPkg/TcpDxe/SockInterface.c b/NetworkPkg/TcpDxe/SockInterface.c index e36c0e97c8..ebab8c7f18 100644 --- a/NetworkPkg/TcpDxe/SockInterface.c +++ b/NetworkPkg/TcpDxe/SockInterface.c @@ -1,7 +1,7 @@ /** @file Interface function of the Socket. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -245,6 +245,7 @@ SockCreateChild ( // with a new protocol control block // Status = Sock->ProtoHandler (Sock, SOCK_ATTACH, NULL); + EfiReleaseLock (&(Sock->Lock)); if (EFI_ERROR (Status)) { DEBUG ( @@ -257,7 +258,6 @@ SockCreateChild ( Sock = NULL; } - EfiReleaseLock (&(Sock->Lock)); return Sock; }