Add some ASSERT()s.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7299 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -2763,6 +2763,7 @@ ConvertTextToDeviceNode (
|
|||||||
ParamStr = NULL;
|
ParamStr = NULL;
|
||||||
DumpNode = NULL;
|
DumpNode = NULL;
|
||||||
DeviceNodeStr = StrDuplicate (TextDeviceNode);
|
DeviceNodeStr = StrDuplicate (TextDeviceNode);
|
||||||
|
ASSERT (DeviceNodeStr != NULL);
|
||||||
|
|
||||||
for (Index = 0; DevPathFromTextTable[Index].Function; Index++) {
|
for (Index = 0; DevPathFromTextTable[Index].Function; Index++) {
|
||||||
ParamStr = GetParamByNodeName (DeviceNodeStr, DevPathFromTextTable[Index].DevicePathNodeText);
|
ParamStr = GetParamByNodeName (DeviceNodeStr, DevPathFromTextTable[Index].DevicePathNodeText);
|
||||||
@ -2822,6 +2823,7 @@ ConvertTextToDevicePath (
|
|||||||
}
|
}
|
||||||
|
|
||||||
DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
|
DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
|
||||||
|
ASSERT (DevicePath != NULL);
|
||||||
SetDevicePathEndNode (DevicePath);
|
SetDevicePathEndNode (DevicePath);
|
||||||
|
|
||||||
ParamStr = NULL;
|
ParamStr = NULL;
|
||||||
@ -2857,6 +2859,7 @@ ConvertTextToDevicePath (
|
|||||||
|
|
||||||
if (IsInstanceEnd != 0) {
|
if (IsInstanceEnd != 0) {
|
||||||
DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
|
DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
|
||||||
|
ASSERT (DeviceNode != NULL);
|
||||||
SET_DEVICE_PATH_INSTANCE_END_NODE (DeviceNode);
|
SET_DEVICE_PATH_INSTANCE_END_NODE (DeviceNode);
|
||||||
|
|
||||||
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
|
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
|
||||||
|
@ -708,6 +708,7 @@ DevPathToTextUsbWWID (
|
|||||||
// In case no NULL terminator in SerialNumber, create a new one with NULL terminator
|
// In case no NULL terminator in SerialNumber, create a new one with NULL terminator
|
||||||
//
|
//
|
||||||
NewStr = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), SerialNumberStr);
|
NewStr = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), SerialNumberStr);
|
||||||
|
ASSERT (NewStr != NULL);
|
||||||
NewStr [Length] = 0;
|
NewStr [Length] = 0;
|
||||||
SerialNumberStr = NewStr;
|
SerialNumberStr = NewStr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user