diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-10-04 16:28:35 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-10-04 16:28:35 +0000 |
commit | e53bf79de7429a7c49799d2d3a5571e1e77108d7 (patch) | |
tree | 5950af4071dc26cd10fcfb66c15ca880c0b6d158 /ShellPkg/Library/UefiShellCommandLib | |
parent | 0ab85bef03a4265f928ea5c9dbfa2328658738ac (diff) | |
download | edk2-platforms-e53bf79de7429a7c49799d2d3a5571e1e77108d7.tar.xz |
verify that a memory allocation was successful.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10907 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellCommandLib')
-rw-r--r-- | ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c | 3 |
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;
}
|