mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
0ab85bef03
commit
e53bf79de7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue