Add check before free DevicePath (TCP child sock will have no device path installed)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9617 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2 2009-12-25 09:49:38 +00:00
parent 41335d2244
commit 29056ed2de
1 changed files with 9 additions and 7 deletions

View File

@ -227,14 +227,16 @@ Tcp4FlushPcb (
RemoveEntryList (&Tcb->List); RemoveEntryList (&Tcb->List);
// //
// Uninstall the device path protocl. // Uninstall the device path protocol.
// //
gBS->UninstallProtocolInterface ( if (Sock->DevicePath != NULL) {
Sock->SockHandle, gBS->UninstallProtocolInterface (
&gEfiDevicePathProtocolGuid, Sock->SockHandle,
Sock->DevicePath &gEfiDevicePathProtocolGuid,
); Sock->DevicePath
FreePool (Sock->DevicePath); );
FreePool (Sock->DevicePath);
}
TcpSetVariableData (TcpProto->TcpService); TcpSetVariableData (TcpProto->TcpService);
} }