mirror of
https://github.com/opnsense/src.git
synced 2026-02-25 11:00:15 -05:00
efipart_inithandles() is missing NULL pointer check
Add missing check of malloc() result.
This commit is contained in:
parent
ef91a071ac
commit
79cbcdcf3e
1 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue