if (ModeStr != NULL && *(ModeStr + AsciiStrLen (";mode=octet")) == '\0') {\r
*ModeStr = '\0';\r
} else if (AsciiStrStr (BootFileNamePtr, ";mode=") != NULL) {\r
+ FreePool (TmpStr);\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto ON_ERROR;\r
}\r
\r
//\r
//\r
Status = Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto ON_ERROR;\r
}\r
\r
Status = PxeBc->UdpRead (\r
Private->Udp6Read->Configure (Private->Udp6Read, NULL);\r
\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto ON_ERROR;\r
}\r
\r
//\r
Reply->Length = (UINT32) ReadSize;\r
\r
return EFI_SUCCESS;\r
+ \r
+ON_ERROR:\r
+ if (Discover != NULL) {\r
+ FreePool (Discover);\r
+ }\r
+\r
+ return Status;\r
}\r
\r
\r
(VOID *) Discover\r
);\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto ON_ERROR;\r
}\r
\r
//\r
//\r
Status = Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto ON_ERROR;\r
}\r
\r
Status = PxeBc->UdpRead (\r
//\r
Private->Udp6Read->Configure (Private->Udp6Read, NULL);\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto ON_ERROR;\r
}\r
\r
return EFI_SUCCESS;\r
+\r
+ON_ERROR:\r
+ if (Discover != NULL) {\r
+ FreePool (Discover);\r
+ }\r
+\r
+ return Status;\r
}\r
\r
\r