mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/Ip4Dxe: Correct the return status
This patch made the following change: * DataItem->Status should be updated to the status code. * Data should not be freed if EFI_NOT_READY returned. Cc: Santhapur Naveen <naveens@amiindia.co.in> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
818ba0ef81
commit
7278ce8cec
|
@ -1282,21 +1282,17 @@ Ip4Config2SetMaunualAddress (
|
||||||
|
|
||||||
IpSb->Reconfig = TRUE;
|
IpSb->Reconfig = TRUE;
|
||||||
Status = Ip4Config2SetDefaultAddr (IpSb, StationAddress, SubnetMask);
|
Status = Ip4Config2SetDefaultAddr (IpSb, StationAddress, SubnetMask);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
goto ON_EXIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
DataItem->Status = EFI_SUCCESS;
|
DataItem->Status = Status;
|
||||||
|
|
||||||
ON_EXIT:
|
if (EFI_ERROR (DataItem->Status) && DataItem->Status != EFI_NOT_READY) {
|
||||||
if (EFI_ERROR (DataItem->Status)) {
|
|
||||||
if (Ptr != NULL) {
|
if (Ptr != NULL) {
|
||||||
FreePool (Ptr);
|
FreePool (Ptr);
|
||||||
}
|
}
|
||||||
DataItem->Data.Ptr = NULL;
|
DataItem->Data.Ptr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue