aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_gop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 411a8c92261..85b5391ed1d 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -173,6 +173,10 @@ int efi_gop_register(void)
}
gopobj = calloc(1, sizeof(*gopobj));
+ if (!gopobj) {
+ printf("ERROR: Out of memory\n");
+ return 1;
+ }
/* Fill in object data */
gopobj->parent.protocols[0].guid = &efi_gop_guid;