connect_controllers() is missing NULL pointer check
Add missing check of malloc() result.
This commit is contained in:
parent
8abc11f65c
commit
ef91a071ac
@ -52,6 +52,8 @@ connect_controllers(EFI_GUID *filter)
|
||||
}
|
||||
|
||||
handles = malloc(hsize);
|
||||
if (handles == NULL)
|
||||
return (EFI_OUT_OF_RESOURCES);
|
||||
nhandles = hsize / sizeof(EFI_HANDLE);
|
||||
|
||||
status = BS->LocateHandle(ByProtocol, filter, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user