aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/libefi/handles.c
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/libefi/handles.c')
-rw-r--r--stand/efi/libefi/handles.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stand/efi/libefi/handles.c b/stand/efi/libefi/handles.c
index 1e4ef6ffbd50..a55239dbec8c 100644
--- a/stand/efi/libefi/handles.c
+++ b/stand/efi/libefi/handles.c
@@ -52,6 +52,8 @@ efi_register_handles(struct devsw *sw, EFI_HANDLE *handles,
nentries += count;
sz = nentries * sizeof(struct entry);
entry = (entry == NULL) ? malloc(sz) : realloc(entry, sz);
+ if (entry == NULL)
+ return (ENOMEM);
for (unit = 0; idx < nentries; idx++, unit++) {
entry[idx].handle = handles[unit];
if (aliases != NULL)