/** @file\r
Helper Routines that use a PXE-enabled NIC option ROM.\r
\r
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
InOutRegs.X.AX)\r
);\r
\r
+ if ((UndiLoaderTable->Status != 0) || (InOutRegs.X.AX != PXENV_EXIT_SUCCESS)) {\r
+ DEBUG ((DEBUG_NET, "LaunchBaseCode exits with error, RomAddress = 0x%X\n\r", RomAddress));\r
+ return EFI_ABORTED;\r
+ }\r
+\r
DEBUG ((DEBUG_NET, "Now returned from the UNDI code\n\r"));\r
\r
DEBUG ((DEBUG_NET, "After the call, we have...\n\r"));\r
Pxe = (PXE_T *)(UINTN)((UndiLoaderTable->PXEptr.Segment << 4) + UndiLoaderTable->PXEptr.Offset);\r
SimpleNetworkDevice->Nii.Id = (UINT64)(UINTN) Pxe;\r
\r
+ gBS->FreePool (Buffer);\r
+\r
//\r
- // FreePool (Buffer);\r
// paranoia - make sure a valid !PXE structure\r
//\r
if (CompareMem (Pxe->Signature, PXE_SIG, sizeof Pxe->Signature) != 0) {\r