Add pointer check for NULL before dereference it.
Signed-off-by: sfu5 Reviewed-by: xdu2 Reviewed-by: ydong10 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12514 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1933,6 +1933,9 @@ InternalCommandLineParse (
|
||||
// initialize the linked list
|
||||
//
|
||||
*CheckPackage = (LIST_ENTRY*)AllocateZeroPool(sizeof(LIST_ENTRY));
|
||||
if (*CheckPackage == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
InitializeListHead(*CheckPackage);
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user