efipart_inithandles() is missing NULL pointer check
Add missing check of malloc() result.
This commit is contained in:
parent
ef91a071ac
commit
79cbcdcf3e
@ -363,6 +363,8 @@ efipart_inithandles(void)
|
||||
status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin);
|
||||
if (status == EFI_BUFFER_TOO_SMALL) {
|
||||
hin = malloc(sz);
|
||||
if (hin == NULL)
|
||||
return (ENOMEM);
|
||||
status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz,
|
||||
hin);
|
||||
if (EFI_ERROR(status))
|
||||
|
Loading…
Reference in New Issue
Block a user