summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2016-11-11 12:52:49 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2016-11-17 08:21:29 +0800
commit7278ce8cec488e13a513fb4e1546f09e25574ba1 (patch)
treef46e10b62158c10acdc187816b00ab38ca81ed28 /MdeModulePkg/Universal
parent818ba0ef81516c0cc8de3ff9a97495fd02e4c8a7 (diff)
downloadedk2-platforms-7278ce8cec488e13a513fb4e1546f09e25574ba1.tar.xz
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>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
index 5b01b35b76..88ead9d269 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
@@ -1282,21 +1282,17 @@ Ip4Config2SetMaunualAddress (
IpSb->Reconfig = TRUE;
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)) {
+ if (EFI_ERROR (DataItem->Status) && DataItem->Status != EFI_NOT_READY) {
if (Ptr != NULL) {
FreePool (Ptr);
}
DataItem->Data.Ptr = NULL;
}
- return EFI_SUCCESS;
+ return Status;
}
/**