Update network drivers to use FreePool() instead of gBS->FreePool().

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9424 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2
2009-11-13 06:13:59 +00:00
parent 2f3c9af25e
commit 766c7483c3
42 changed files with 192 additions and 192 deletions

View File

@@ -180,7 +180,7 @@ Mtftp4CreateService (
);
if (EFI_ERROR (Status)) {
gBS->FreePool (MtftpSb);
FreePool (MtftpSb);
return Status;
}
@@ -197,7 +197,7 @@ Mtftp4CreateService (
);
if (EFI_ERROR (Status)) {
gBS->CloseEvent (MtftpSb->Timer);
gBS->FreePool (MtftpSb);
FreePool (MtftpSb);
return Status;
}
@@ -212,7 +212,7 @@ Mtftp4CreateService (
if (MtftpSb->ConnectUdp == NULL) {
gBS->CloseEvent (MtftpSb->TimerToGetMap);
gBS->CloseEvent (MtftpSb->Timer);
gBS->FreePool (MtftpSb);
FreePool (MtftpSb);
return EFI_DEVICE_ERROR;
}
@@ -311,7 +311,7 @@ Mtftp4DriverBindingStart (
ON_ERROR:
Mtftp4CleanService (MtftpSb);
gBS->FreePool (MtftpSb);
FreePool (MtftpSb);
return Status;
}
@@ -390,7 +390,7 @@ Mtftp4DriverBindingStop (
Mtftp4CleanService (MtftpSb);
gBS->FreePool (MtftpSb);
FreePool (MtftpSb);
} else {
while (!IsListEmpty (&MtftpSb->Children)) {
@@ -482,7 +482,7 @@ Mtftp4ServiceBindingCreateChild (
);
if (Instance->UnicastPort == NULL) {
gBS->FreePool (Instance);
FreePool (Instance);
return EFI_OUT_OF_RESOURCES;
}
@@ -538,7 +538,7 @@ ON_ERROR:
if (EFI_ERROR (Status)) {
UdpIoFreeIo (Instance->UnicastPort);
gBS->FreePool (Instance);
FreePool (Instance);
}
return Status;
@@ -637,6 +637,6 @@ Mtftp4ServiceBindingDestroyChild (
gBS->RestoreTPL (OldTpl);
gBS->FreePool (Instance);
FreePool (Instance);
return EFI_SUCCESS;
}

View File

@@ -65,7 +65,7 @@ Mtftp4CleanOperation (
NET_LIST_FOR_EACH_SAFE (Entry, Next, &Instance->Blocks) {
Block = NET_LIST_USER_STRUCT (Entry, MTFTP4_BLOCK_RANGE, Link);
RemoveEntryList (Entry);
gBS->FreePool (Block);
FreePool (Block);
}
ZeroMem (&Instance->RequestOption, sizeof (MTFTP4_OPTION));

View File

@@ -1,7 +1,7 @@
/** @file
Routines to process MTFTP4 options.
Copyright (c) 2006 - 2007, Intel Corporation<BR>
Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -528,6 +528,6 @@ Mtftp4ParseOptionOack (
Status = Mtftp4ParseOption (OptionList, Count, FALSE, MtftpOption);
gBS->FreePool (OptionList);
FreePool (OptionList);
return Status;
}

View File

@@ -743,7 +743,7 @@ ON_EXIT:
// receive, otherwise end the session.
//
if ((Packet != NULL) && (UdpPacket->BlockOpNum > 1)) {
gBS->FreePool (Packet);
FreePool (Packet);
}
if (UdpPacket != NULL) {

View File

@@ -139,7 +139,7 @@ Mtftp4SetLastBlockNum (
if (Range->Start > Last) {
RemoveEntryList (&Range->Link);
gBS->FreePool (Range);
FreePool (Range);
continue;
}
@@ -209,7 +209,7 @@ Mtftp4RemoveBlockNum (
if (Range->Start > Range->End) {
RemoveEntryList (&Range->Link);
gBS->FreePool (Range);
FreePool (Range);
}
return EFI_SUCCESS;

View File

@@ -91,7 +91,7 @@ Mtftp4WrqSendBlock (
if (EFI_ERROR (Status) || (DataLen > Instance->BlkSize)) {
if (DataBuf != NULL) {
gBS->FreePool (DataBuf);
FreePool (DataBuf);
}
Mtftp4SendError (
@@ -111,7 +111,7 @@ Mtftp4WrqSendBlock (
if (DataLen > 0) {
NetbufAllocSpace (UdpPacket, DataLen, FALSE);
CopyMem (Packet->Data.Data, DataBuf, DataLen);
gBS->FreePool (DataBuf);
FreePool (DataBuf);
}
}
@@ -462,7 +462,7 @@ ON_EXIT:
// restart the receive, otherwise end the session.
//
if ((Packet != NULL) && (UdpPacket->BlockOpNum > 1)) {
gBS->FreePool (Packet);
FreePool (Packet);
}
if (UdpPacket != NULL) {