summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c')
-rwxr-xr-xShellPkg/Library/UefiShellCommandLib/ConsistMapping.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c b/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
index 1767a7d..9ef6a01 100755
--- a/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
+++ b/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
@@ -1404,6 +1404,10 @@ GetHIDevicePath (
NonHIDevicePathNodeCount = 0;
HIDevicePath = AllocateZeroPool (sizeof (EFI_DEVICE_PATH_PROTOCOL));
+ if (HIDevicePath == NULL) {
+ return NULL;
+ }
+
SetDevicePathEndNode (HIDevicePath);
Node.DevPath.Type = END_DEVICE_PATH_TYPE;