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:
@@ -49,7 +49,7 @@ Ip4ConfigGetNicInfo (
|
||||
Config = Ip4ConfigFindNicVariable (Variable, NicAddr);
|
||||
|
||||
if (Config == NULL) {
|
||||
gBS->FreePool (Variable);
|
||||
FreePool (Variable);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@ Ip4ConfigGetNicInfo (
|
||||
Ip4ConfigWriteVariable (NewVariable);
|
||||
|
||||
if (NewVariable != NULL) {
|
||||
gBS->FreePool (NewVariable);
|
||||
FreePool (NewVariable);
|
||||
};
|
||||
|
||||
gBS->FreePool (Config);
|
||||
FreePool (Config);
|
||||
Config = NULL;
|
||||
}
|
||||
|
||||
gBS->FreePool (Variable);
|
||||
FreePool (Variable);
|
||||
return Config;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ EfiNicIp4ConfigGetInfo (
|
||||
|
||||
*ConfigLen = Len;
|
||||
|
||||
gBS->FreePool (Config);
|
||||
FreePool (Config);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -200,14 +200,14 @@ EfiNicIp4ConfigSetInfo (
|
||||
Status = Ip4ConfigWriteVariable (NewVariable);
|
||||
|
||||
if (NewVariable != NULL) {
|
||||
gBS->FreePool (NewVariable);
|
||||
FreePool (NewVariable);
|
||||
}
|
||||
|
||||
//
|
||||
// Variable is NULL when saving the first configure parameter
|
||||
//
|
||||
if (Variable != NULL) {
|
||||
gBS->FreePool (Variable);
|
||||
FreePool (Variable);
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -277,7 +277,7 @@ Ip4ConfigOnDhcp4Complete (
|
||||
if (Instance->NicConfig != NULL) {
|
||||
ASSERT (Instance->NicConfig->Source == IP4_CONFIG_SOURCE_DHCP);
|
||||
Perment = Instance->NicConfig->Perment;
|
||||
gBS->FreePool (Instance->NicConfig);
|
||||
FreePool (Instance->NicConfig);
|
||||
}
|
||||
|
||||
Instance->NicConfig = AllocatePool (sizeof (NIC_IP4_CONFIG_INFO) + 2* sizeof (EFI_IP4_ROUTE_TABLE));
|
||||
@@ -741,7 +741,7 @@ Ip4ConfigCleanConfig (
|
||||
)
|
||||
{
|
||||
if (Instance->NicConfig != NULL) {
|
||||
gBS->FreePool (Instance->NicConfig);
|
||||
FreePool (Instance->NicConfig);
|
||||
Instance->NicConfig = NULL;
|
||||
}
|
||||
|
||||
|
@@ -335,21 +335,21 @@ Ip4ConfigDriverBindingStart (
|
||||
Ip4ConfigWriteVariable (NewVariable);
|
||||
|
||||
if (NewVariable != NULL) {
|
||||
gBS->FreePool (NewVariable);
|
||||
FreePool (NewVariable);
|
||||
}
|
||||
|
||||
ON_EXIT:
|
||||
gBS->FreePool (Variable);
|
||||
FreePool (Variable);
|
||||
|
||||
if (NicConfig != NULL) {
|
||||
gBS->FreePool (NicConfig);
|
||||
FreePool (NicConfig);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
ON_ERROR:
|
||||
if (Instance != NULL) {
|
||||
gBS->FreePool (Instance);
|
||||
FreePool (Instance);
|
||||
}
|
||||
|
||||
if (Mnp != NULL) {
|
||||
@@ -506,7 +506,7 @@ Ip4ConfigDriverBindingStop (
|
||||
|
||||
Ip4ConfigCleanConfig (Instance);
|
||||
mIp4ConfigNicList[Instance->NicIndex] = NULL;
|
||||
gBS->FreePool (Instance);
|
||||
FreePool (Instance);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -1039,7 +1039,7 @@ Ip4ConfigUpdateForm (
|
||||
|
||||
mNumberOfIp4Devices--;
|
||||
RemoveEntryList (&ConfigFormEntry->Link);
|
||||
gBS->FreePool (ConfigFormEntry);
|
||||
FreePool (ConfigFormEntry);
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -151,7 +151,7 @@ REMOVE_VARIABLE:
|
||||
|
||||
ON_ERROR:
|
||||
if (Variable != NULL) {
|
||||
gBS->FreePool (Variable);
|
||||
FreePool (Variable);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -296,7 +296,7 @@ Ip4ConfigModifyVariable (
|
||||
|
||||
if (Old != NULL) {
|
||||
TotalLen -= SIZEOF_NIC_IP4_CONFIG_INFO (Old);
|
||||
gBS->FreePool (Old);
|
||||
FreePool (Old);
|
||||
}
|
||||
|
||||
if (Config != NULL) {
|
||||
|
Reference in New Issue
Block a user