The malloc will return NULL if it can't allocate memory.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-18 05:19:45 +00:00
parent 6a35cae5ed
commit bb0bd931dc

View File

@ -492,7 +492,7 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
iobufsize = SBLOCKSIZE + 3 * sblock.fs_bsize;
else
iobufsize = 4 * sblock.fs_bsize;
if ((iobuf = malloc(iobufsize)) == 0) {
if ((iobuf = malloc(iobufsize)) == NULL) {
printf("Cannot allocate I/O buffer\n");
exit(38);
}