Sync the bug that list node is free before it is removed from the list. That made the list invalid.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4641 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2008-01-29 08:47:42 +00:00
parent 7a372cf045
commit 4f6e31e47b
6 changed files with 219 additions and 163 deletions

View File

@@ -425,8 +425,6 @@ TcpCloneTcb (
)
{
TCP_CB *Clone;
TCP4_SERVICE_DATA *TcpService;
EFI_IP4_PROTOCOL *Ip4;
Clone = NetAllocatePool (sizeof (TCP_CB));
@@ -455,34 +453,6 @@ TcpCloneTcb (
((TCP4_PROTO_DATA *) (Clone->Sk->ProtoReserved))->TcpPcb = Clone;
TcpService = ((TCP4_PROTO_DATA *) (Clone->Sk->ProtoReserved))->TcpService;
NetListInsertTail (&TcpService->SocketList, &Clone->Sk->Link);
//
// Open the device path on the handle where service binding resides on.
//
gBS->OpenProtocol (
TcpService->ControllerHandle,
&gEfiDevicePathProtocolGuid,
(VOID **) &Clone->Sk->ParentDevicePath,
TcpService->DriverBindingHandle,
Clone->Sk->SockHandle,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
//
// Open the ip protocol by child controller.
//
gBS->OpenProtocol (
TcpService->IpIo->ChildHandle,
&gEfiIp4ProtocolGuid,
(VOID **) &Ip4,
TcpService->DriverBindingHandle,
Clone->Sk->SockHandle,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
return Clone;
}