diff options
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/mambo/mambo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index 154c734..69e0796 100644 --- a/platforms/mambo/mambo.c +++ b/platforms/mambo/mambo.c @@ -197,6 +197,12 @@ static void bogus_disk_flash_init(void) bl = zalloc(sizeof(struct blocklevel_device)); bdi = zalloc(sizeof(struct bogus_disk_info)); + if (!bl || !bdi) { + free(bl); + free(bdi); + prerror("mambo: Failed to start bogus disk, ENOMEM\n"); + return; + } bl->read = &bogus_disk_read; bl->write = &bogus_disk_write; |