Verify memory allocations were successful.
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel3CommandsLib / Alias.c
index da53af4..1428d37 100644 (file)
@@ -41,6 +41,9 @@ PrintAllShellAlias(
     return (SHELL_SUCCESS);\r
   }\r
   Alias = AllocateZeroPool(StrSize(ConstAllAliasList));\r
+  if (Alias == NULL) {\r
+    return (SHELL_OUT_OF_RESOURCES);\r
+  }\r
   Walker = (CHAR16*)ConstAllAliasList;\r
 \r
   do {\r