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
Driver Binding functions implementationfor for UefiPxeBc Driver.\r
\r
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
- Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2018, 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 of the BSD License\r
&Private->PxeBc,\r
NULL\r
);\r
+ FreePool (Private->Ip4Nic->DevicePath);\r
\r
if (Private->Snp != NULL) { \r
//\r
&Private->PxeBc,\r
NULL\r
);\r
+ FreePool (Private->Ip6Nic->DevicePath);\r
+ \r
if (Private->Snp != NULL) {\r
//\r
// Close SNP from the child virtual handle\r