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:
@@ -165,7 +165,7 @@ IScsiCHAPOnRspReceived (
|
||||
//
|
||||
KeyValueList = IScsiBuildKeyValueList ((CHAR8 *) Data, Len);
|
||||
if (KeyValueList == NULL) {
|
||||
gBS->FreePool (Data);
|
||||
FreePool (Data);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ ON_EXIT:
|
||||
|
||||
IScsiFreeKeyValueList (KeyValueList);
|
||||
|
||||
gBS->FreePool (Data);
|
||||
FreePool (Data);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -422,8 +422,8 @@ IScsiCHAPToSendReq (
|
||||
break;
|
||||
}
|
||||
|
||||
gBS->FreePool (Response);
|
||||
gBS->FreePool (Challenge);
|
||||
FreePool (Response);
|
||||
FreePool (Challenge);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@@ -168,9 +168,9 @@ IScsiUpdateDeviceList (
|
||||
gRT->SetVariable (MacString, &mIScsiCHAPAuthInfoGuid, 0, 0, NULL);
|
||||
}
|
||||
|
||||
gBS->FreePool (DeviceList);
|
||||
FreePool (DeviceList);
|
||||
} else if (Status != EFI_NOT_FOUND) {
|
||||
gBS->FreePool (Handles);
|
||||
FreePool (Handles);
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@@ -197,8 +197,8 @@ IScsiUpdateDeviceList (
|
||||
DeviceList
|
||||
);
|
||||
|
||||
gBS->FreePool (DeviceList);
|
||||
gBS->FreePool (Handles);
|
||||
FreePool (DeviceList);
|
||||
FreePool (Handles);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ IScsiFormExtractConfig (
|
||||
Results,
|
||||
Progress
|
||||
);
|
||||
gBS->FreePool (IfrNvData);
|
||||
FreePool (IfrNvData);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -873,7 +873,7 @@ IScsiConfigUpdateForm (
|
||||
|
||||
mNumberOfIScsiDevices--;
|
||||
RemoveEntryList (&ConfigFormEntry->Link);
|
||||
gBS->FreePool (ConfigFormEntry);
|
||||
FreePool (ConfigFormEntry);
|
||||
}
|
||||
//
|
||||
// Allocate space for creation of Buffer
|
||||
@@ -1055,7 +1055,7 @@ IScsiConfigFormUnload (
|
||||
&mCallbackInfo->ConfigAccess,
|
||||
NULL
|
||||
);
|
||||
gBS->FreePool (mCallbackInfo);
|
||||
FreePool (mCallbackInfo);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -162,7 +162,7 @@ IScsiDhcpExtractRootPath (
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
gBS->FreePool (TmpStr);
|
||||
FreePool (TmpStr);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ IScsiDhcpSelectOffer (
|
||||
|
||||
Status = This->Parse (This, Packet, &OptionCount, OptionList);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (OptionList);
|
||||
FreePool (OptionList);
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ IScsiDhcpSelectOffer (
|
||||
Status = EFI_NOT_READY;
|
||||
}
|
||||
|
||||
gBS->FreePool (OptionList);
|
||||
FreePool (OptionList);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -295,7 +295,7 @@ IScsiParseDhcpAck (
|
||||
|
||||
Status = Dhcp4->Parse (Dhcp4, Dhcp4ModeData.ReplyPacket, &OptionCount, OptionList);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (OptionList);
|
||||
FreePool (OptionList);
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ IScsiParseDhcpAck (
|
||||
}
|
||||
}
|
||||
|
||||
gBS->FreePool (OptionList);
|
||||
FreePool (OptionList);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -432,7 +432,7 @@ IScsiDoDhcp (
|
||||
ON_EXIT:
|
||||
|
||||
if (ParaList != NULL) {
|
||||
gBS->FreePool (ParaList);
|
||||
FreePool (ParaList);
|
||||
}
|
||||
|
||||
if (Dhcp4 != NULL) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The entry point of IScsi driver.
|
||||
|
||||
Copyright (c) 2004 - 2008, Intel Corporation.<BR>
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -371,7 +371,7 @@ EfiIScsiUnload (
|
||||
}
|
||||
|
||||
if (DeviceHandleBuffer != NULL) {
|
||||
gBS->FreePool (DeviceHandleBuffer);
|
||||
FreePool (DeviceHandleBuffer);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@@ -540,7 +540,7 @@ IScsiCreateDriverData (
|
||||
&Private->ExitBootServiceEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ IScsiCreateDriverData (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -592,7 +592,7 @@ IScsiCleanDriverData (
|
||||
Private->DevicePath
|
||||
);
|
||||
|
||||
gBS->FreePool (Private->DevicePath);
|
||||
FreePool (Private->DevicePath);
|
||||
}
|
||||
|
||||
if (Private->ExtScsiPassThruHandle != NULL) {
|
||||
@@ -605,7 +605,7 @@ IScsiCleanDriverData (
|
||||
|
||||
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
||||
|
||||
gBS->FreePool (Private);
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -215,7 +215,7 @@ IScsiCreateConnection (
|
||||
&Conn->TimeoutEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (Conn);
|
||||
FreePool (Conn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ IScsiCreateConnection (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->CloseEvent (Conn->TimeoutEvent);
|
||||
gBS->FreePool (Conn);
|
||||
FreePool (Conn);
|
||||
Conn = NULL;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ IScsiDestroyConnection (
|
||||
Tcp4IoDestroySocket (&Conn->Tcp4Io);
|
||||
NetbufQueFlush (&Conn->RspQue);
|
||||
gBS->CloseEvent (Conn->TimeoutEvent);
|
||||
gBS->FreePool (Conn);
|
||||
FreePool (Conn);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -875,7 +875,7 @@ IScsiFreeNbufList (
|
||||
ASSERT (Arg != NULL);
|
||||
|
||||
NetbufFreeList ((LIST_ENTRY *) Arg);
|
||||
gBS->FreePool (Arg);
|
||||
FreePool (Arg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -944,7 +944,7 @@ IScsiReceivePdu (
|
||||
Len = sizeof (ISCSI_BASIC_HEADER) + (HeaderDigest ? sizeof (UINT32) : 0);
|
||||
PduHdr = NetbufAlloc (Len);
|
||||
if (PduHdr == NULL) {
|
||||
gBS->FreePool (NbufList);
|
||||
FreePool (NbufList);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@@ -1134,7 +1134,7 @@ IScsiCheckOpParams (
|
||||
//
|
||||
KeyValueList = IScsiBuildKeyValueList (Data, Len);
|
||||
if (KeyValueList == NULL) {
|
||||
gBS->FreePool (Data);
|
||||
FreePool (Data);
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
@@ -1337,7 +1337,7 @@ ON_ERROR:
|
||||
|
||||
IScsiFreeKeyValueList (KeyValueList);
|
||||
|
||||
gBS->FreePool (Data);
|
||||
FreePool (Data);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ IScsiBuildKeyValueList (
|
||||
Data++;
|
||||
Len--;
|
||||
} else {
|
||||
gBS->FreePool (KeyValuePair);
|
||||
FreePool (KeyValuePair);
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
@@ -1534,7 +1534,7 @@ IScsiGetValueByKeyFromList (
|
||||
Value = KeyValuePair->Value;
|
||||
|
||||
RemoveEntryList (&KeyValuePair->List);
|
||||
gBS->FreePool (KeyValuePair);
|
||||
FreePool (KeyValuePair);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1559,10 +1559,10 @@ IScsiFreeKeyValueList (
|
||||
Entry = NetListRemoveHead (KeyValueList);
|
||||
KeyValuePair = NET_LIST_USER_STRUCT (Entry, ISCSI_KEY_VALUE_PAIR, List);
|
||||
|
||||
gBS->FreePool (KeyValuePair);
|
||||
FreePool (KeyValuePair);
|
||||
}
|
||||
|
||||
gBS->FreePool (KeyValueList);
|
||||
FreePool (KeyValueList);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1678,7 +1678,7 @@ IScsiDelTcb (
|
||||
{
|
||||
RemoveEntryList (&Tcb->Link);
|
||||
|
||||
gBS->FreePool (Tcb);
|
||||
FreePool (Tcb);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1969,7 +1969,7 @@ IScsiNewDataOutPdu (
|
||||
//
|
||||
PduHdr = NetbufAlloc (sizeof (ISCSI_SCSI_DATA_OUT));
|
||||
if (PduHdr == NULL) {
|
||||
gBS->FreePool (NbufList);
|
||||
FreePool (NbufList);
|
||||
return NULL;
|
||||
}
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The wrap of TCP/IP Socket interface.
|
||||
|
||||
Copyright (c) 2004 - 2007, Intel Corporation.<BR>
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -386,7 +386,7 @@ Tcp4IoTransmit (
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
gBS->FreePool (TxData);
|
||||
FreePool (TxData);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -481,7 +481,7 @@ Tcp4IoReceive (
|
||||
|
||||
ON_EXIT:
|
||||
Tcp4Io->RxToken.Packet.RxData = NULL;
|
||||
gBS->FreePool (Fragment);
|
||||
FreePool (Fragment);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user