Catch various cases in libpayload where malloc() or memalign() return NULL
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4474 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
committed by
Stefan Reinauer
parent
131c0070a3
commit
5fe6e23c61
@@ -346,6 +346,9 @@ usb_msc_init (usbdev_t *dev)
|
||||
}
|
||||
|
||||
dev->data = malloc (sizeof (usbmsc_inst_t));
|
||||
if (!dev->data)
|
||||
usb_fatal("Not enough memory for USB MSC device.\n");
|
||||
|
||||
MSC_INST (dev)->bulk_in = 0;
|
||||
MSC_INST (dev)->bulk_out = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user