//\r
TempNewDevicePath = NewDevicePath;\r
NewDevicePath = AppendDevicePathInstance (NewDevicePath, CustomizedConDevicePath);\r
- SafeFreePool(TempNewDevicePath);\r
+ if (TempNewDevicePath != NULL) {\r
+ FreePool(TempNewDevicePath);\r
+ }\r
}\r
}\r
\r
);\r
\r
if (VarConsole == NewDevicePath) {\r
- SafeFreePool(VarConsole);\r
+ if (VarConsole != NULL) {\r
+ FreePool(VarConsole);\r
+ }\r
} else {\r
- SafeFreePool(VarConsole);\r
- SafeFreePool(NewDevicePath);\r
+ if (VarConsole != NULL) {\r
+ FreePool(VarConsole);\r
+ }\r
+ if (NewDevicePath) {\r
+ FreePool(NewDevicePath);\r
+ }\r
}\r
\r
return EFI_SUCCESS;\r
DeviceExist = TRUE;\r
}\r
}\r
- SafeFreePool(Instance);\r
+ FreePool(Instance);\r
} while (CopyOfDevicePath != NULL);\r
\r
- SafeFreePool (StartDevicePath);\r
+ FreePool (StartDevicePath);\r
\r
if (!DeviceExist) {\r
return EFI_NOT_FOUND;\r
BdsLibUpdateConsoleVariable (L"ConIn", ConDevicePath, NULL);\r
}\r
\r
- SafeFreePool(HandleBuffer);\r
+ if (HandleBuffer != NULL) {\r
+ FreePool(HandleBuffer);\r
+ HandleBuffer = NULL;\r
+ }\r
\r
gBS->LocateHandleBuffer (\r
ByProtocol,\r
BdsLibUpdateConsoleVariable (L"ErrOut", ConDevicePath, NULL);\r
}\r
\r
- SafeFreePool(HandleBuffer);\r
+ if (HandleBuffer != NULL) {\r
+ FreePool(HandleBuffer);\r
+ }\r
\r
//\r
// Connect all console variables\r