1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358159

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,