summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c b/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
index 64f504a258..c29e7e93fe 100644
--- a/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
+++ b/ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
@@ -1279,6 +1279,9 @@ ShellCommandConsistMappingGenMappingName (
NewSize = (Str.Len + 1) * sizeof (CHAR16);
Str.Str = ReallocatePool (Str.Len, NewSize, Str.Str);
+ if (Str.Str == NULL) {
+ return (NULL);
+ }
Str.Str[Str.Len] = CHAR_NULL;
return Str.Str;
}