Calloc may return NULL. We have to check the return value.
Fixes:
be8d324191f efi_loader: Add GOP support
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
}
gopobj = calloc(1, sizeof(*gopobj));
}
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;
/* Fill in object data */
gopobj->parent.protocols[0].guid = &efi_gop_guid;