connect_controllers() is missing NULL pointer check

Add missing check of malloc() result.
This commit is contained in:
Toomas Soome 2020-02-20 08:55:18 +00:00
parent 8abc11f65c
commit ef91a071ac

View File

@ -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,